Skip to content

Commit

Permalink
fix: enable knobs for stories
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyblip committed Sep 9, 2020
1 parent 2a752ea commit 6d6e45d
Showing 1 changed file with 8 additions and 2 deletions.
@@ -1,8 +1,14 @@
// if you use expo remove this line
import { AppRegistry } from 'react-native';
import { getStorybookUI, configure } from '@storybook/react-native';

import { getStorybookUI, configure, addDecorator } from '@storybook/react-native';
import { withKnobs } from '@storybook/addon-knobs';

import './rn-addons';

// enables knobs for all stories
addDecorator(withKnobs);

// import stories
configure(() => {
require('./stories');
Expand All @@ -13,7 +19,7 @@ configure(() => {
const StorybookUIRoot = getStorybookUI({});

// If you are using React Native vanilla and after installation you don't see your app name here, write it manually.
// If you use Expo you can safely remove this line.
// If you use Expo you should remove this line.
AppRegistry.registerComponent('%APP_NAME%', () => StorybookUIRoot);

export default StorybookUIRoot;

0 comments on commit 6d6e45d

Please sign in to comment.