UNPKG

@engie-group/fluid-design-system-react

Version:

Fluid Design System React

17 lines (16 loc) 846 B
import { type HeadingProperties } from '@engie-group/fluid-types'; import React from 'react'; export type NJHeadingProps<T extends React.ElementType> = { /** * The html element to render */ as?: T; } & HeadingProperties & React.ComponentPropsWithoutRef<T>; declare const Component: <T extends React.ElementType>({ children, as, scale, isNotInvertible, variant, className, ...htmlProps }: NJHeadingProps<T>, ref: React.ForwardedRef<HTMLElement>) => import("react/jsx-runtime").JSX.Element; /** Generic type with forwardRef * (cf. https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref) */ export declare const NJHeading: <T extends React.ElementType = "h3">(props: NJHeadingProps<T> & { ref?: React.ForwardedRef<HTMLElement>; }) => ReturnType<typeof Component>; export {};