Fix Storybook (#97)

This commit is contained in:
Rodrigo Nascimento 2017-11-27 21:29:15 -02:00 committed by Guilherme Gazzo
parent f65a284953
commit 69a0746850
2 changed files with 3 additions and 14 deletions

View File

@ -52,11 +52,11 @@
"regenerator-runtime": "^0.11.0", "regenerator-runtime": "^0.11.0",
"remote-redux-devtools": "^0.5.12", "remote-redux-devtools": "^0.5.12",
"strip-ansi": "^4.0.0", "strip-ansi": "^4.0.0",
"@storybook/react-native": "^3.2.15",
"snyk": "^1.41.1" "snyk": "^1.41.1"
}, },
"devDependencies": { "devDependencies": {
"@storybook/addon-storyshots": "^3.2.15", "@storybook/addon-storyshots": "^3.2.15",
"@storybook/react-native": "^3.2.15",
"babel-eslint": "^8.0.2", "babel-eslint": "^8.0.2",
"babel-jest": "21.2.0", "babel-jest": "21.2.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.10", "babel-plugin-transform-react-remove-prop-types": "^0.4.10",

View File

@ -1,6 +1,4 @@
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions, global-require */ import { AppRegistry } from 'react-native';
import { Navigation } from 'react-native-navigation';
import { getStorybookUI, configure } from '@storybook/react-native'; import { getStorybookUI, configure } from '@storybook/react-native';
// import stories // import stories
@ -11,15 +9,6 @@ configure(() => {
// This assumes that storybook is running on the same host as your RN packager, // This assumes that storybook is running on the same host as your RN packager,
// to set manually use, e.g. host: 'localhost' option // to set manually use, e.g. host: 'localhost' option
const StorybookUI = getStorybookUI({ port: 7007, onDeviceUI: true }); const StorybookUI = getStorybookUI({ port: 7007, onDeviceUI: true });
Navigation.registerComponent('storybook.UI', () => StorybookUI); AppRegistry.registerComponent('RocketChatRN', () => StorybookUI);
Navigation.startSingleScreenApp({
screen: {
screen: 'storybook.UI',
title: 'Storybook',
navigatorStyle: {
navBarHidden: true
}
}
});
export default StorybookUI; export default StorybookUI;