import { Canvas, Meta, Story, Source, ArgsTable } from '@storybook/addon-docs'; import { tokens } from '../cunningham-tokens'; # Typo Cunningham comes with an existing toolkit to deal with typography, and it's easy. 🖋️ ## Sizes You can use custom utility classes to set the font size of an element. These classes are named using the format `.fs-{size}`. Medium text `} />
{Object.keys(tokens.theme.font.sizes).map(key => (
Using the fs-{key} class
))}
You can customize the values of the font size design tokens with the configuration file this way: ## Weights You can use custom utility classes to set the font weight of an element. These classes are named using the format `.fw-{weight}`. Large size bold text `} />
{Object.keys(tokens.theme.font.weights).map(key => (
Using the fw-{key} class
))}
You can customize the values of the font weight design tokens with the configuration file this way: ## Families You can use custom utility classes to set the font family of an element. These classes are named using the format `.f-{family}`. For now, the design system only relies on `Roboto` font-family for both `base` and `accent` variations. But you can customize it. The font associated with `f-base` is the default font for the whole application, so there is no need to use the `f-base` class on every dom element. Accent text `} />
{Object.keys(tokens.theme.font.families).map(key => (
Using the f-{key} class
))}
You can customize the values of the font family design tokens with the configuration file this way: