UNPKG

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

Version:

Fluid Design System React

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