text
Text is the component used to render text and paragraphs. It renders a paragraph by default.
Install
yarn add @gdo-bzh/text react styled-components @xstyled/styled-components @gdo-bzh/box @gdo-bzh/theme @gdo-bzh/system
Usage
import React from 'react'
const Example = () => <Text size="md">medium</Text>
Types
type BoxProps = React.ComponentProps<typeof Box>
type IntrinsicHTMLSpanProps = React.DetailedHTMLProps<
React.HTMLAttributes<HTMLElement>,
HTMLElement
>
type Props = IntrinsicHTMLSpanProps &
BoxProps & {
children: React.ReactText
/**
* @default medium
*/
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl'
/**
* @default false
*/
truncated?: boolean
}
License
MIT © gdo-bzh