@storybook/addon-ondevice-backgrounds
A react-native storybook addon to show different backgrounds for your preview
Last updated a month ago by dannyhw .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @storybook/addon-ondevice-backgrounds 
SYNC missed versions from official npm registry.

Storybook Backgrounds Addon for react-native

Storybook Backgrounds Addon for react-native can be used to change background colors of your stories right from the device.

Storybook Backgrounds Addon Demo

Installation

yarn add -D @storybook/addon-ondevice-backgrounds

Configuration

Create a file called rn-addons.js in your storybook config.

Add following content to it:

import '@storybook/addon-ondevice-backgrounds/register';

Then import rn-addons.js next to your getStorybookUI call.

import './rn-addons';

Usage

react-native users will have to import storiesOf from @storybook/react-native and are required to add the withBackgrounds decorator.

Then write your stories like this:

import React from 'react';
import { storiesOf } from '@storybook/react-native';
import { withBackgrounds } from '@storybook/addon-ondevice-backgrounds';

addDecorator(withBackgrounds);

storiesOf('Button', module)
  .addParameters({
    backgrounds: [
      { name: 'dark', value: '#222222' },
      { name: 'light', value: '#eeeeee', default: true },
    ],
  })
  .add('with text', () => <Text>Click me</Text>);

See web backgrounds addon for detailed usage and the crna-kitchen-sink app for more examples.

Current Tags

  • 5.3.22-alpha.1                                ...           alpha (2 months ago)
  • 5.3.23                                ...           latest (a month ago)
  • 6.0.0-alpha.0                                ...           next (9 months ago)

352 Versions

  • 5.3.23                                ...           a month ago
  • 5.3.22                                ...           a month ago
  • 5.3.22-alpha.1                                ...           2 months ago
  • 5.3.21                                ...           2 months ago
  • 5.3.21-alpha.0                                ...           2 months ago
  • 5.3.20-alpha.1                                ...           2 months ago
  • 5.3.20                                ...           2 months ago
  • 5.3.20-alpha.0                                ...           2 months ago
  • 5.3.19                                ...           5 months ago
  • 5.3.18                                ...           7 months ago
  • 5.3.17                                ...           7 months ago
  • 5.3.15                                ...           7 months ago
  • 5.3.14                                ...           8 months ago
  • 5.3.13                                ...           8 months ago
  • 5.3.12                                ...           9 months ago
  • 5.3.11                                ...           9 months ago
  • 5.3.10                                ...           9 months ago
  • 5.3.9                                ...           9 months ago
  • 5.3.8                                ...           9 months ago
  • 6.0.0-alpha.0                                ...           9 months ago
  • 5.3.7                                ...           9 months ago
  • 5.3.6                                ...           9 months ago
  • 5.3.5                                ...           9 months ago
  • 5.3.4                                ...           9 months ago
  • 5.3.3                                ...           9 months ago
  • 5.3.2                                ...           9 months ago
  • 5.3.1                                ...           9 months ago
  • 5.3.0                                ...           9 months ago
  • 5.3.0-rc.14                                ...           9 months ago
  • 5.3.0-rc.13                                ...           10 months ago
  • 5.3.0-rc.12                                ...           10 months ago
  • 5.3.0-rc.11                                ...           10 months ago
  • 5.3.0-rc.10                                ...           10 months ago
  • 5.3.0-rc.9                                ...           10 months ago
  • 5.3.0-rc.8                                ...           10 months ago
  • 5.3.0-rc.7                                ...           10 months ago
  • 5.3.0-rc.6                                ...           10 months ago
  • 5.3.0-rc.5                                ...           10 months ago
  • 5.3.0-rc.4                                ...           10 months ago
  • 5.3.0-rc.3                                ...           10 months ago
  • 5.3.0-rc.1                                ...           10 months ago
  • 5.3.0-rc.0                                ...           10 months ago
  • 5.3.0-beta.28                                ...           10 months ago
  • 5.3.0-beta.27                                ...           10 months ago
  • 5.3.0-beta.31                                ...           10 months ago
  • 5.3.0-beta.30                                ...           10 months ago
  • 5.3.0-beta.29                                ...           10 months ago
  • 5.3.0-beta.26                                ...           10 months ago
  • 5.3.0-beta.25                                ...           10 months ago
  • 5.3.0-beta.23                                ...           10 months ago
  • 5.3.0-beta.22                                ...           10 months ago
  • 5.3.0-beta.21                                ...           a year ago
  • 5.3.0-beta.20                                ...           a year ago
  • 5.3.0-beta.19                                ...           a year ago
  • 5.3.0-beta.18                                ...           a year ago
  • 5.3.0-beta.17                                ...           a year ago
  • 5.3.0-beta.16                                ...           a year ago
  • 5.3.0-beta.15                                ...           a year ago
  • 5.2.8                                ...           a year ago
  • 5.3.0-beta.14                                ...           a year ago
  • 5.2.7                                ...           a year ago
  • 5.3.0-beta.13                                ...           a year ago
  • 5.3.0-beta.12                                ...           a year ago
  • 5.3.0-beta.11                                ...           a year ago
  • 5.3.0-beta.10                                ...           a year ago
  • 5.3.0-beta.9                                ...           a year ago
  • 5.3.0-beta.8                                ...           a year ago
  • 5.3.0-beta.6                                ...           a year ago
  • 5.3.0-beta.3                                ...           a year ago
  • 5.3.0-beta.2                                ...           a year ago
  • 5.3.0-beta.1                                ...           a year ago
  • 5.3.0-beta.0                                ...           a year ago
  • 5.3.0-alpha.47                                ...           a year ago
  • 5.3.0-alpha.46                                ...           a year ago
  • 5.3.0-alpha.45                                ...           a year ago
  • 5.3.0-alpha.44                                ...           a year ago
  • 5.3.0-alpha.43                                ...           a year ago
  • 5.2.6                                ...           a year ago
  • 5.3.0-alpha.42                                ...           a year ago
  • 5.3.0-alpha.41                                ...           a year ago
  • 5.3.0-alpha.40                                ...           a year ago
  • 5.3.0-alpha.39                                ...           a year ago
  • 5.3.0-alpha.38                                ...           a year ago
  • 5.3.0-alpha.37                                ...           a year ago
  • 5.3.0-alpha.36                                ...           a year ago
  • 5.3.0-alpha.35                                ...           a year ago
  • 5.3.0-alpha.34                                ...           a year ago
  • 5.3.0-alpha.33                                ...           a year ago
  • 5.3.0-alpha.32                                ...           a year ago
  • 5.3.0-alpha.31                                ...           a year ago
  • 5.3.0-alpha.30                                ...           a year ago
  • 5.3.0-alpha.29                                ...           a year ago
  • 5.3.0-alpha.28                                ...           a year ago
  • 5.3.0-alpha.27                                ...           a year ago
  • 5.3.0-alpha.26                                ...           a year ago
  • 5.3.0-alpha.25                                ...           a year ago
  • 5.3.0-alpha.24                                ...           a year ago
  • 5.2.5                                ...           a year ago
  • 5.3.0-alpha.23                                ...           a year ago
  • 5.3.0-alpha.22                                ...           a year ago
  • 5.3.0-alpha.21                                ...           a year ago
  • 5.3.0-alpha.20                                ...           a year ago
  • 5.3.0-alpha.19                                ...           a year ago
  • 5.2.4                                ...           a year ago
  • 5.3.0-alpha.18                                ...           a year ago
  • 5.3.0-alpha.17                                ...           a year ago
  • 5.3.0-alpha.15                                ...           a year ago
  • 5.3.0-alpha.13                                ...           a year ago
  • 5.3.0-alpha.12                                ...           a year ago
  • 5.2.3                                ...           a year ago
  • 5.2.2                                ...           a year ago
  • 5.3.0-alpha.11                                ...           a year ago
  • 5.3.0-alpha.10                                ...           a year ago
  • 5.3.0-alpha.9                                ...           a year ago
  • 5.3.0-alpha.7                                ...           a year ago
  • 5.3.0-alpha.6                                ...           a year ago
  • 5.3.0-alpha.5                                ...           a year ago
  • 5.3.0-alpha.4                                ...           a year ago
  • 5.3.0-alpha.3                                ...           a year ago
  • 5.3.0-alpha.2                                ...           a year ago
  • 5.3.0-alpha.1                                ...           a year ago
  • 5.2.1                                ...           a year ago
  • 5.3.0-alpha.0                                ...           a year ago
  • 5.2.0                                ...           a year ago
  • 5.2.0-rc.11                                ...           a year ago
  • 5.2.0-rc.10                                ...           a year ago
  • 5.2.0-rc.9                                ...           a year ago
  • 5.2.0-rc.8                                ...           a year ago
  • 5.2.0-rc.6                                ...           a year ago
  • 5.2.0-rc.5                                ...           a year ago
  • 5.2.0-rc.4                                ...           a year ago
  • 5.2.0-rc.2                                ...           a year ago
  • 5.2.0-rc.1                                ...           a year ago
  • 5.2.0-rc.0                                ...           a year ago
  • 5.2.0-beta.48                                ...           a year ago
  • 5.2.0-beta.47                                ...           a year ago
  • 5.2.0-beta.46                                ...           a year ago
  • 5.2.0-beta.45                                ...           a year ago
  • 5.2.0-beta.43                                ...           a year ago
  • 5.2.0-beta.42                                ...           a year ago
  • 5.2.0-beta.41                                ...           a year ago
  • 5.2.0-beta.40                                ...           a year ago
  • 5.2.0-beta.39                                ...           a year ago
  • 5.2.0-beta.38                                ...           a year ago
  • 5.2.0-beta.37                                ...           a year ago
  • 5.2.0-beta.36                                ...           a year ago
  • 5.2.0-beta.33                                ...           a year ago
  • 5.2.0-beta.32                                ...           a year ago
  • 5.2.0-beta.31                                ...           a year ago
  • 5.2.0-beta.30                                ...           a year ago
  • 5.1.11                                ...           a year ago
  • 5.2.0-beta.29                                ...           a year ago
  • 5.2.0-beta.28                                ...           a year ago
  • 5.2.0-beta.27                                ...           a year ago
  • 5.2.0-beta.26                                ...           a year ago
  • 5.2.0-beta.25                                ...           a year ago
  • 5.2.0-beta.24                                ...           a year ago
  • 5.2.0-beta.23                                ...           a year ago
  • 5.2.0-beta.22                                ...           a year ago
  • 5.2.0-beta.21                                ...           a year ago
  • 5.2.0-beta.20                                ...           a year ago
  • 5.2.0-beta.19                                ...           a year ago
  • 5.1.10                                ...           a year ago
  • 5.2.0-beta.18                                ...           a year ago
  • 5.2.0-beta.17                                ...           a year ago
  • 5.2.0-beta.16                                ...           a year ago
  • 5.2.0-beta.15                                ...           a year ago
  • 5.2.0-beta.14                                ...           a year ago
  • 5.2.0-beta.13                                ...           a year ago
  • 5.2.0-beta.12                                ...           a year ago
  • 5.2.0-beta.10                                ...           a year ago
  • 5.2.0-beta.9                                ...           a year ago
  • 5.2.0-beta.8                                ...           a year ago
  • 5.2.0-beta.7                                ...           a year ago
  • 5.2.0-beta.6                                ...           a year ago
  • 5.2.0-beta.5                                ...           a year ago
  • 5.2.0-beta.4                                ...           a year ago
  • 5.2.0-beta.3                                ...           a year ago
  • 5.2.0-beta.2                                ...           a year ago
  • 5.2.0-beta.1                                ...           a year ago
  • 5.2.0-beta.0                                ...           a year ago
  • 5.2.0-alpha.44                                ...           a year ago
  • 5.2.0-alpha.43                                ...           a year ago
  • 5.2.0-alpha.42                                ...           a year ago
  • 5.2.0-alpha.41                                ...           a year ago
  • 5.2.0-alpha.40                                ...           a year ago
  • 5.2.0-alpha.39                                ...           a year ago
  • 5.2.0-alpha.38                                ...           a year ago
  • 5.2.0-alpha.37                                ...           a year ago
  • 5.2.0-alpha.36                                ...           a year ago
  • 5.2.0-alpha.35                                ...           a year ago
  • 5.2.0-alpha.34                                ...           a year ago
  • 5.2.0-alpha.33                                ...           a year ago
  • 5.2.0-alpha.32                                ...           a year ago
  • 5.2.0-alpha.31                                ...           a year ago
  • 5.2.0-alpha.30                                ...           a year ago
  • 5.1.9                                ...           a year ago
  • 5.2.0-alpha.29                                ...           a year ago
  • 5.2.0-alpha.28                                ...           a year ago
  • 5.2.0-alpha.27                                ...           a year ago
  • 5.1.8                                ...           a year ago
  • 5.2.0-alpha.26                                ...           a year ago
  • 5.1.7                                ...           a year ago
  • 5.1.6                                ...           a year ago
  • 5.1.5                                ...           a year ago
  • 5.1.4                                ...           a year ago
  • 5.2.0-alpha.24                                ...           a year ago
  • 5.2.0-alpha.23                                ...           a year ago
  • 5.2.0-alpha.22                                ...           a year ago
  • 5.1.3                                ...           a year ago
  • 5.1.1                                ...           a year ago
  • 5.1.0-rc.5                                ...           a year ago
  • 5.1.0-rc.4                                ...           a year ago
  • 5.2.0-alpha.21                                ...           a year ago
  • 5.2.0-alpha.20                                ...           a year ago
  • 5.1.0-rc.3                                ...           a year ago
  • 5.2.0-alpha.19                                ...           a year ago
  • 5.1.0-rc.2                                ...           a year ago
  • 5.2.0-alpha.18                                ...           a year ago
  • 5.2.0-alpha.17                                ...           a year ago
  • 5.2.0-alpha.16                                ...           a year ago
  • 5.2.0-alpha.15                                ...           a year ago
  • 5.2.0-alpha.14                                ...           a year ago
  • 5.1.0-rc.1                                ...           a year ago
  • 5.2.0-alpha.13                                ...           a year ago
  • 5.2.0-alpha.12                                ...           a year ago
  • 5.2.0-alpha.11                                ...           a year ago
  • 5.1.0-rc.0                                ...           a year ago
  • 5.2.0-alpha.10                                ...           a year ago
  • 5.2.0-alpha.9                                ...           a year ago
  • 5.1.0-beta.1                                ...           a year ago
  • 5.2.0-alpha.8                                ...           a year ago
  • 5.2.0-alpha.7                                ...           a year ago
  • 5.2.0-alpha.6                                ...           a year ago
  • 5.2.0-alpha.5                                ...           a year ago
  • 5.2.0-alpha.4                                ...           a year ago
  • 5.1.0-beta.0                                ...           a year ago
  • 5.1.0-alpha.40                                ...           a year ago
  • 5.1.0-alpha.39                                ...           a year ago
  • 5.1.0-alpha.37                                ...           a year ago
  • 5.2.0-alpha.3                                ...           a year ago
  • 5.2.0-alpha.2                                ...           a year ago
  • 5.2.0-alpha.1                                ...           a year ago
  • 5.2.0-alpha.0                                ...           a year ago
  • 5.1.0-alpha.36                                ...           a year ago
  • 5.1.0-alpha.35                                ...           a year ago
  • 5.1.0-alpha.34                                ...           2 years ago
  • 5.1.0-alpha.33                                ...           2 years ago
  • 5.1.0-alpha.32                                ...           2 years ago
  • 5.1.0-alpha.31                                ...           2 years ago
  • 5.1.0-alpha.30                                ...           2 years ago
  • 5.1.0-alpha.29                                ...           2 years ago
  • 5.1.0-alpha.28                                ...           2 years ago
  • 4.1.18                                ...           2 years ago
  • 5.1.0-alpha.27                                ...           2 years ago
  • 5.1.0-alpha.26                                ...           2 years ago
  • 5.1.0-alpha.25                                ...           2 years ago
  • 5.1.0-alpha.24                                ...           2 years ago
  • 5.1.0-alpha.23                                ...           2 years ago
  • 5.1.0-alpha.22                                ...           2 years ago
  • 5.1.0-alpha.21                                ...           2 years ago
  • 5.1.0-alpha.20                                ...           2 years ago
  • 5.1.0-alpha.19                                ...           2 years ago
  • 5.1.0-alpha.18                                ...           2 years ago
  • 5.1.0-alpha.17                                ...           2 years ago
  • 5.1.0-alpha.16                                ...           2 years ago
  • 5.1.0-alpha.15                                ...           2 years ago
  • 5.1.0-alpha.14                                ...           2 years ago
  • 4.1.16                                ...           2 years ago
  • 5.1.0-alpha.13                                ...           2 years ago
  • 5.1.0-alpha.12                                ...           2 years ago
  • 5.1.0-alpha.11                                ...           2 years ago
  • 5.1.0-alpha.10                                ...           2 years ago
  • 5.1.0-alpha.9                                ...           2 years ago
  • 5.1.0-alpha.8                                ...           2 years ago
  • 5.1.0-alpha.7                                ...           2 years ago
  • 4.1.14                                ...           2 years ago
  • 4.1.13                                ...           2 years ago
  • 4.1.12                                ...           2 years ago
  • 5.0.0-beta.4                                ...           2 years ago
  • 5.0.0-beta.3                                ...           2 years ago
  • 5.0.0-beta.2                                ...           2 years ago
  • 5.0.0-beta.1                                ...           2 years ago
  • 5.0.0-alpha.11                                ...           2 years ago
  • 5.0.0-alpha.10                                ...           2 years ago
  • 4.1.11                                ...           2 years ago
  • 5.0.0-alpha.9                                ...           2 years ago
  • 4.1.9                                ...           2 years ago
  • 4.1.8                                ...           2 years ago
  • 5.0.0-alpha.8                                ...           2 years ago
  • 5.0.0-alpha.7                                ...           2 years ago
  • 5.0.0-alpha.6                                ...           2 years ago
  • 4.1.7                                ...           2 years ago
  • 5.0.0-alpha.5                                ...           2 years ago
  • 5.0.0-alpha.4                                ...           2 years ago
  • 5.0.0-alpha.3                                ...           2 years ago
  • 5.0.0-alpha.2                                ...           2 years ago
  • 5.0.0-alpha.1                                ...           2 years ago
  • 5.0.0-alpha.0                                ...           2 years ago
  • 5.0.0-debug.3                                ...           2 years ago
  • 5.0.0-debug.2                                ...           2 years ago
  • 5.0.0-debug.1                                ...           2 years ago
  • 4.2.0-alpha.11                                ...           2 years ago
  • 4.1.6                                ...           2 years ago
  • 4.1.5-react-debug.1                                ...           2 years ago
  • 4.1.5-react-debug.0                                ...           2 years ago
  • 5.0.0-debug.0                                ...           2 years ago
  • 4.2.0-alpha.10                                ...           2 years ago
  • 4.2.0-alpha.9                                ...           2 years ago
  • 4.2.0-alpha.8                                ...           2 years ago
  • 4.1.4                                ...           2 years ago
  • 4.2.0-alpha.7                                ...           2 years ago
  • 4.2.0-alpha.6                                ...           2 years ago
  • 4.1.3                                ...           2 years ago
  • 4.2.0-alpha.5                                ...           2 years ago
  • 4.2.0-alpha.4                                ...           2 years ago
  • 4.2.0-alpha.3                                ...           2 years ago
  • 4.2.0-alpha.2                                ...           2 years ago
  • 4.1.2                                ...           2 years ago
  • 4.2.0-alpha.1                                ...           2 years ago
  • 4.1.1                                ...           2 years ago
  • 4.1.0                                ...           2 years ago
  • 4.1.0-alpha.13                                ...           2 years ago
  • 4.1.0-alpha.12                                ...           2 years ago
  • 4.0.12                                ...           2 years ago
  • 4.1.0-alpha.11                                ...           2 years ago
  • 4.0.11                                ...           2 years ago
  • 4.0.10                                ...           2 years ago
  • 4.1.0-alpha.10                                ...           2 years ago
  • 4.1.0-alpha.9                                ...           2 years ago
  • 4.1.0-alpha.8                                ...           2 years ago
  • 4.1.0-alpha.7                                ...           2 years ago
  • 4.1.0-alpha.4                                ...           2 years ago
  • 4.0.8                                ...           2 years ago
  • 4.1.0-alpha.3                                ...           2 years ago
  • 4.0.7                                ...           2 years ago
  • 4.1.0-alpha.2                                ...           2 years ago
  • 4.0.6                                ...           2 years ago
  • 4.1.0-alpha.1                                ...           2 years ago
  • 4.0.4                                ...           2 years ago
  • 4.0.3                                ...           2 years ago
  • 4.0.2                                ...           2 years ago
  • 4.0.1                                ...           2 years ago
  • 4.0.0                                ...           2 years ago
  • 4.0.0-rc.6                                ...           2 years ago
  • 4.0.0-rc.5                                ...           2 years ago
  • 4.0.0-rc.4                                ...           2 years ago
  • 4.0.0-rc.3                                ...           2 years ago
  • 4.0.0-rc.2                                ...           2 years ago
  • 4.0.0-rc.1                                ...           2 years ago
  • 4.0.0-rc.0                                ...           2 years ago
  • 4.0.0-alpha.25                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 1
Last Month 46
Dependencies (5)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |