Typography components. We have two typography components: Heading
and Text
.
yarn add @ndla/typography
npm i --save @ndla/typography
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.
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.