UNPKG

@cerberus-design/react

Version:

The Cerberus Design React component library.

28 lines (27 loc) 971 B
import { HTMLAttributes } from 'react'; import { CerberusPrimitiveProps } from '../../system/index'; /** * This module exports a component for rendering text utilizing the styled-system JSX utility. * @module @cerberus/react/Text */ export type Headings = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; export type TextElements = 'p' | 'strong' | 'em' | 'small' | 'span'; export interface TextProps extends CerberusPrimitiveProps<HTMLAttributes<HTMLParagraphElement>> { /** * The element to render as. Defaults to 'p'. */ as?: TextElements | Headings; } /** * A component for rendering text utilizing the styled-system JSX utility. * @definition [Text docs](https://cerberus.digitalu.design/react/text) * @example * ```tsx * <Text as="h1" color="page.text.100" textStyle={{ * base: 'heading-md', * md: 'heading-lg', * }}> * Hello, world! * </Text> */ export declare function Text(props: TextProps): import("react/jsx-runtime").JSX.Element;