react-storybook-addon-backgrounds-jackmccloy-fork
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

NewSpring Church

react-storybook-addon-backgrounds

Build Status Coverage Status

React Storybook Screenshot

Getting Started

npm i --save react-storybook-addon-backgrounds

Then create a file called addons.js in your storybook config.

Add following content to it:

import '@kadira/storybook/addons';
import 'react-storybook-addon-backgrounds/register';

Then write your stories like this:

import React from 'react';
import { storiesOf } from "@kadira/storybook";
import backgrounds from "react-storybook-addon-backgrounds";
 
storiesOf("Button", module)
  .addDecorator(backgrounds([
    { name: "twitter", value: "#00aced", default: true },
    { name: "facebook", value: "#3b5998" },
  ]))
  .add("with text", () => <button>Click me</button>)
  ;

Development

This project is built using typescript and is tested with jest. To get started, clone this repo and run the following command:

$ npm install # install node deps 

To run the project locally, run:

$ npm run storybook # for storybook testing 
# (coming soon) $ npm run test-watch # for testing 

To test the project run:

$ npm test

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.7
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.7
    1

Package Sidebar

Install

npm i react-storybook-addon-backgrounds-jackmccloy-fork

Weekly Downloads

1

Version

0.0.7

License

MIT

Last publish

Collaborators

  • jackmccloy