import React from 'react'; import cx from 'classnames'; import '../styles/_utils.scss'; import styles from './Text.module.scss'; /** * Initialized monospace and sans types since they have different attributes. */ export interface MonoProps { /** Specify the font style that is available within the font family. */ font?: 'mono'; /** Specify the font weight that is available within the font family. */ weight?: 'normal' | 'bold'; /** Set the italic style. */ italic?: never; } export interface SansProps { /** Specify the font style that is available within the font family. */ font?: 'sans'; /** Specify the font weight that is available within the font family. */ weight?: 'normal' | 'medium' | 'bold' | 'semiBold' | 'extraBold'; /** Set the italic style. */ italic?: boolean; } export interface TextProps { /** How the text should appear, regardless of the actual tag being rendered (the `as` property). These styles will be overridden if other props have values. */ appearance?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'small' | 'code'; /** The HTML tag that should be used to render the text. Styling can be overridden by the `appearance` property or any of the other properties available. */ as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'span' | 'p' | 'small' | 'code'; /** Modify the casing of the text. */ casing?: 'capitalize' | 'lowercase' | 'uppercase'; /** The content for the Text component. */ children: React.ReactNode; /** Add a CSS class to adjust top and bottom margin if needed.*/ className?: Parameters[0]; /** Change the color shade of the text. */ contrast?: 'default' | 'low' | 'high' | 'inverse-default' | 'inverse-low' | 'inverse-high'; /** Add ellipsis to text that is too long for parent container */ hasEllipsis?: boolean; /** Apply id for `Text` container. */ id?: string; /** Specify the margin area of all four sides of an element. */ m?: 0 | 0.5 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | number; /** Specify the margin area on the top of an element. */ mt?: 0 | 0.5 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | number; /** Specify the margin area on the right of an element. */ mr?: 0 | 0.5 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | number; /** Specify the margin area on the bottom of an element. */ mb?: 0 | 0.5 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | number; /** Specify the margin area on the left of an element. */ ml?: 0 | 0.5 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | number; /** Specify the margin area on the left & right of an element. */ mx?: 0 | 0.5 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | number; /** Specify the margin area on the top & bottom of an element. */ my?: 0 | 0.5 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | number; /** Prevent text from wrapping */ noWrap?: boolean; /** The optional ARIA role of the text element. */ role?: 'paragraph' | 'heading' | 'code' | 'img'; /** Change the size of the text. */ size?: 60 | 48 | 36 | 32 | 28 | 24 | 20 | 18 | 16 | 14 | 12; } export declare type Props = TextProps & (MonoProps | SansProps); export declare const Text: React.FC; export default Text; export { styles }; //# sourceMappingURL=index.d.ts.map