UNPKG

@heycar-uikit/core

Version:
31 lines (30 loc) 869 B
/// <reference types="react" /> import React from 'react'; import { HTMLAttributes } from "react"; import { defaultVariantMapping } from "./Typography.constants"; type DefaultMapKeys = keyof typeof defaultVariantMapping; interface ComponentProps { /** * `children` of the element */ children: React.ReactNode; /** * `variant` - typography variant */ variant?: DefaultMapKeys; /** * `dataTestId` - the id for testing lab */ dataTestId?: string; /** * `className` - additional styles, like color */ className?: string; /** * `Component` - string containing customized HTML tag */ Component?: React.ElementType; } type TypographyProps = ComponentProps & HTMLAttributes<HTMLElement>; declare const Typography: React.FC<TypographyProps>; export { Typography as default, Typography };