@ndla/typography
v0.4.25
Published
Typography components library for NDLA.
Downloads
6
Keywords
Readme
Typography
Typography components. We have two typography components: Heading
and Text
.
Installation
yarn add @ndla/typography
npm i --save @ndla/typography
Usage
Heading
import { Heading } from "@ndla/typography";
<Heading headingStyle="h1" element="h1" margin="normal">
{title}
</Heading>;
Can be controlles using headingStyle
, element
, serif
, margin
props. The rendered element can be updated using the element prop.
Text
import { Text } from "@ndla/typography";
<Text textStyle="ingress" element="span" margin="normal" />;
Can be controlles using textStyle
, element
, margin
props. The rendered element can be updated using the element prop.