Skip to content

jouwomgeving/storybook-addon-fonts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

storybook-addon-fonts npm version

Storybook addon to decorate you're stories with custom font families.

Only system and google fonts are supported for now.

Getting started

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>
  ));

About

A addon for Strorybook allowing font switching

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published