@gdo-bzh/text

Text is the component used to render text and paragraphs. It renders a paragraph by default.

Usage no npm install needed!

<script type="module">
  import gdoBzhText from 'https://cdn.skypack.dev/@gdo-bzh/text';
</script>

README

version

text

NPM JavaScript Style Guide

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