@navinc/base-react-components
Version:
Nav's Pattern Library
59 lines (58 loc) • 2.17 kB
TypeScript
import { DetailedHTMLProps, HTMLAttributes } from 'react';
export type TextProps = {
/**
* @deprecated The \`bold\` prop on Base React Component Text component is deprecated and support will be removed in a future version. Please use \`$bold\` instead.
*/
bold?: boolean;
size?: SizeKey;
boldType?: BoldKey;
$bold?: boolean;
light?: boolean;
} & DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
declare const sizeVariants: {
small: {
fontSize: string;
lineHeight: string;
};
medium: {
fontSize: string;
lineHeight: string;
};
regular: {
fontSize: string;
lineHeight: string;
};
large: {
fontSize: string;
lineHeight: string;
};
};
declare const boldVariants: {
regular: {
fontWeight: number;
};
semiBold: {
fontWeight: number;
};
bold: {
fontWeight: number;
};
};
type BoldKey = keyof typeof boldVariants;
type SizeKey = keyof typeof sizeVariants;
/**
* @deprecated Use `CopyVariant as Copy` instead. Use `component='span'` to turn any nested Copy component into a span tag. This component will be removed in a future release. CopyVariant replaces Header, Copy, and Text.
*
* The `span` of base-react-components. Text can be used inside of `Copy` to give isolated variant styles to what it wraps. Ei: `bold` or `light`.
*/
export declare const Text: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<{
/**
* @deprecated The \`bold\` prop on Base React Component Text component is deprecated and support will be removed in a future version. Please use \`$bold\` instead.
*/
bold?: boolean;
size?: SizeKey;
boldType?: BoldKey;
$bold?: boolean;
light?: boolean;
} & import("react").ClassAttributes<HTMLSpanElement> & HTMLAttributes<HTMLSpanElement>, TextProps>> & string & Omit<({ bold: _bold, light: _light, size: _size, boldType: _boldType, ...props }: TextProps) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>;
export {};