UNPKG

@surveycake/rc

Version:

react component of surveycake

28 lines (27 loc) 1.05 kB
import React, { HTMLAttributes } from 'react'; import { ColorProp } from '../types/color'; import { Theme } from '../styles'; declare type TypographyElement = HTMLHeadingElement | HTMLParagraphElement | HTMLDivElement; export interface TypographyProps extends Omit<HTMLAttributes<TypographyElement>, 'color'> { className?: string; /** * The component used for the root node. Either a string to use a DOM element or a component. */ variant: keyof Theme['typography']['fontSize']; color?: ColorProp; /** * If not passed, it will be `400`. */ weight?: keyof Theme['typography']['fontWeight']; /** * If `true`, there will be a bottom margin. */ gutterBottom?: boolean; /** * If `true`, the text will not wrap, but instead will truncate with an ellipsis. */ noWrap?: boolean; align?: 'C' | 'R' | ''; } declare const Typography: React.ForwardRefExoticComponent<TypographyProps & React.RefAttributes<TypographyElement>>; export default Typography;