Storybook addon to decorate you're stories with custom font families.
Only system and google fonts are supported for now.
First, install the addon.
$ npm install -D @jouwomgeving/storybook-addon-fonts
Add this line to your addons.js
file (create this file inside your storybook config directory if needed).
import 'storybook-addon-fonts/register';
import the 'withFonts'
decorator to check you're stories for violations within your components.
import React from 'react';
import { storiesOf } from '@kadira/storybook';
import withFonts from 'storybook-addon-fonts';
storiesOf('button', module)
.addDecorator(withFonts)
.add('Accessible', () => (
<button>
Lorem ipsum
</button>
));