diff --git a/lib/cli/generators/REACT_NATIVE/template/storybook/index.js b/lib/cli/generators/REACT_NATIVE/template/storybook/index.android.js similarity index 100% rename from lib/cli/generators/REACT_NATIVE/template/storybook/index.js rename to lib/cli/generators/REACT_NATIVE/template/storybook/index.android.js diff --git a/lib/cli/generators/REACT_NATIVE/template/storybook/index.ios.js b/lib/cli/generators/REACT_NATIVE/template/storybook/index.ios.js new file mode 100644 index 000000000000..87262c017095 --- /dev/null +++ b/lib/cli/generators/REACT_NATIVE/template/storybook/index.ios.js @@ -0,0 +1,11 @@ +import { AppRegistry } from 'react-native'; +import { getStorybookUI, configure } from '@storybook/react-native'; + +// import stories +configure(() => { + require('./stories'); +}, module); + +const StorybookUI = getStorybookUI({ port: 7007, host: 'localhost' }); +AppRegistry.registerComponent('%APP_NAME%', () => StorybookUI); +export default StorybookUI;