UNPKG

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

Version:

Fluid Design System React

17 lines (16 loc) 841 B
import { DisplayProperties } from '@engie-group/fluid-types'; import React from 'react'; export type NJDisplayProps<T extends React.ElementType> = { /** * The html element to render */ as?: T; } & DisplayProperties & React.ComponentPropsWithoutRef<T>; declare const Component: <T extends React.ElementType>({ children, as, scale, isNotInvertible, variant, className, ...htmlProps }: NJDisplayProps<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 NJDisplay: <T extends React.ElementType = "h1">(props: NJDisplayProps<T> & { ref?: React.ForwardedRef<HTMLElement>; }) => ReturnType<typeof Component>; export {};