bpk-storybook-utils

2.1.2 • Public • Published

bpk-storybook-utils

This package contains convenience utilities for use with storybook.

Installation

npm install bpk-storybook-utils --save-dev

Included utilities

action

action uses @storybook/addon-actions if available. If the module is not available, it will fall back to console.log instead. This makes it possible to use the action both within and without environments using storybook.

Usage

import { action } from 'bpk-storybook-utils';

...

action("Thing");

BpkDarkExampleWrapper

Adds a dark background, useful for displaying components that don't appear on a light background.

Usage

import { BpkDarkExampleWrapper } from 'bpk-storybook-utils';

...

<BpkDarkExampleWrapper>
  <p style={{ color: 'white' }}>
    This white text is only visible on dark backgrounds.
  </p>
</BpkDarkExampleWrapper>

Readme

Keywords

none

Package Sidebar

Install

npm i bpk-storybook-utils

Weekly Downloads

28

Version

2.1.2

License

Apache-2.0

Unpacked Size

21.7 kB

Total Files

12

Last publish

Collaborators

  • mungodewar
  • anambl
  • skyscanner-koalasquad
  • gert-jan.vercauteren
  • frugoman
  • marianeumayer-skyscanner
  • ojcurt
  • georgegillams