import React from 'react'; import { PolymorphicAs, PolymorphicPropsWithRef } from '@leafygreen-ui/polymorphic'; import { CommonTypographyProps } from '../types'; interface LocalProps extends CommonTypographyProps { /** * The maximum future weight of the text. Determines the width of the component. * @default 700 */ maxFontWeight?: React.CSSProperties['fontWeight']; /** * Defines the pseudo element used to force the element width */ pseudoElement?: 'before' | 'after'; } type StaticWidthTextProps = PolymorphicPropsWithRef; /** * * A wrapper component to ensure that updating the font weight does not affect the width of the element, * and prevents layout shift should the font weight change. * * Useful for showing a bold effect on hover, focus, or active (See `Tabs`, `MenuItem`). * * Will add an ellipsis if the text would extend beyond the parent, * or if the bold text is significantly larger than the regular text * (This is rare, and will only occur with _very_ long text) * * Note: does not support wrapped text (i.e. text within a paragraph) * * @internal * */ export declare function StaticWidthText({ as, children, maxFontWeight, pseudoElement, className, ...rest }: StaticWidthTextProps): React.JSX.Element; export {}; //# sourceMappingURL=StaticWidthText.d.ts.map