UNPKG

@mskcc/carbon-react

Version:

Carbon react components for the MSKCC DSM

31 lines (30 loc) 1.11 kB
/** * MSKCC DSM 2021, 2023 */ import PropTypes from 'prop-types'; import React from 'react'; import { PolymorphicProps } from '../../types/common'; import { TextDir } from './TextDirection'; export interface TextBaseProps { dir?: TextDir | undefined; } export type TextProps<T extends React.ElementType> = PolymorphicProps<T, TextBaseProps>; declare function Text<T extends React.ElementType>({ as, children, dir, ...rest }: TextProps<T>): JSX.Element; declare namespace Text { var propTypes: { /** * Provide a custom element type used to render the outermost node */ as: PropTypes.Requireable<NonNullable<((...args: any[]) => any) | PropTypes.ReactComponentLike | null | undefined>>; /** * Provide child elements or text to be rendered inside of this component */ children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>; /** * Specify the text direction to be used for this component and any of its * children */ dir: PropTypes.Requireable<string>; }; } export { Text };