UNPKG

@retriever-ui/typography

Version:
40 lines (39 loc) 1.57 kB
import { Responsive } from '@retriever-ui/system'; import { ColorsProperties, ITheme } from '@retriever-ui/theme'; import { HTMLAttributes } from 'react'; export declare type TypographyRefTypes = HTMLParagraphElement & HTMLSpanElement & HTMLTitleElement & HTMLLabelElement; declare type TitleType = HTMLAttributes<HTMLTitleElement>; declare type ParagraphType = HTMLAttributes<HTMLParagraphElement>; declare type SpanType = HTMLAttributes<HTMLSpanElement>; declare type LabelType = HTMLAttributes<HTMLLabelElement>; export declare type TypographyType = TitleType & ParagraphType & SpanType & LabelType; export declare type FontWeight = 'thin' | 'regular' | 'medium' | 'semiBold' | 'bold'; export declare type FontAlign = 'left' | 'center' | 'right' | 'justify'; export declare type TextTags = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'label'; export declare type TypographySize = 'extraSmall' | 'small' | 'medium' | 'large' | 'extraLarge'; export interface TypographyInterface extends TypographyType { tag: TextTags; size?: TypographySize; weight?: FontWeight; fixSize?: string; color?: ColorsProperties<ITheme>; textAlign?: Responsive<FontAlign>; children: any; } export interface TextAlignStyleInterface { sm: FontAlign; md: FontAlign; lg: FontAlign; } export interface TextElementInterface { size: TypographySize; weight: FontWeight; fixSize?: string; color: ColorsProperties<ITheme>; textAlign: { sm: FontAlign; md: FontAlign; lg: FontAlign; }; } export {};