@vygruppen/spor-typography-react
v1.1.3
Published
The typography package consists of all the components you need to add text to your app.
Readme
Typography (React)
The typography package consists of all the components you need to add text to your app.
Installation
$ npm install @vygruppen/spor-typography-reactUsage
import { Text, Paragraph, Heading } from "@vygruppen/spor-typography-react";Text aka Paragraph
A simple paragraph of text.
This component has an alias - Text and Paragraph is the exact same component. Text reads nicer, but Text is also a window global, which will make it troublesome to import automatically.
You can specify all the styles you want as props, including fontSize and color.
<Text>Choo choo, goes the train</Text>
<Paragraph fontSize="sm">In Norwegian, trains go "tøff tøff tøff"</Paragraph>Heading
A heading, that defaults to a H2 with fontSize="xl".
You can override the heading level with the as prop:
<Heading as="h1" fontSize="2xl">
Huge news!
</Heading>Development
Please refer to the root readme for development notes.
