and-design-components-library
Version:
Library of reusable React components based on AND Digital design system.
20 lines (19 loc) • 690 B
TypeScript
import { HTMLAttributes } from 'react';
import { SpaceProps } from 'styled-system';
export interface TextProps extends HTMLAttributes<HTMLParagraphElement>, SpaceProps {
/**
* Accepts a subset of AND Digital typographic styles.
* @default 'bodyMedium'
*/
textStyle?: 'bodySmall' | 'bodyMedium' | 'bodyLarge' | 'button' | 'linkText' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
/**
* Where the rendered text should be aligned to.
* @default 'inherit'
*/
align?: 'inherit' | 'left' | 'right' | 'center';
/**
* Accepts a subset of AND Digital brand colors.
* @default 'colors.charcoal'
*/
color?: string;
}