@gdo-bzh/text
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-rc.4 • Public • Published

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

Package Sidebar

Install

npm i @gdo-bzh/text

Weekly Downloads

0

Version

1.0.0-rc.4

License

MIT

Unpacked Size

9.86 kB

Total Files

8

Last publish

Collaborators

  • gdo