Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* eslint-disable global-require */
import React, { Component } from 'react';
import { AppRegistry } from 'react-native';
import { getStorybookUI, configure } from '@storybook/react-native';
// import stories
configure(() => {
require('../test/stories');
}, module);
// This assumes that storybook is running on the same host as your RN packager,
// to set manually use, e.g. host: 'localhost' option
const StorybookUIRoot = getStorybookUI({ port: 7007, onDeviceUI: true });
// react-native hot module loader must take in a Class - https://github.com/facebook/react-native/issues/10991
// https://github.com/storybooks/storybook/issues/2081
// eslint-disable-next-line react/prefer-stateless-function
class StorybookUIHMRRoot extends Component {
render() {
return ;
}
}
AppRegistry.registerComponent('RNskeleton', () => StorybookUIHMRRoot);
export default StorybookUIHMRRoot;
/* eslint-disable global-require */
import { AppRegistry } from 'react-native';
import { getStorybookUI, configure } from '@storybook/react-native';
// import stories
configure(() => {
require('./stories');
}, module);
// This assumes that storybook is running on the same host as your RN packager,
// to set manually use, e.g. host: 'localhost' option
const StorybookUI = getStorybookUI({ port: 7007, onDeviceUI: true });
AppRegistry.registerComponent('%APP_NAME%', () => StorybookUI);
export default StorybookUI;
import { AppRegistry } from "react-native";
import { getStorybookUI, configure } from "@storybook/react-native";
import { name as appName } from "../app.json";
import "./rn-addons";
// import stories
configure(() => {
require("../src/stories");
}, module);
// Refer to https://github.com/storybooks/storybook/tree/master/app/react-native#start-command-parameters
// To find allowed options for getStorybookUI
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.
AppRegistry.registerComponent(appName, () => StorybookUIRoot);
export default StorybookUIRoot;
import { AppRegistry } from 'react-native';
import { getStorybookUI, configure } from '@storybook/react-native'; // eslint-disable-line
import RNBootSplash from 'react-native-bootsplash';
import 'react-native-gesture-handler';
RNBootSplash.hide();
// import stories
configure(() => {
require('./stories');
}, module);
// Refer to https://github.com/storybooks/storybook/tree/master/app/react-native#start-command-parameters
// To find allowed options for getStorybookUI
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.
AppRegistry.registerComponent('RocketChatRN', () => StorybookUIRoot);
export default StorybookUIRoot;
import { AppRegistry } from 'react-native'
import { getStorybookUI, configure } from '@storybook/react-native'
// import stories
configure(() => {
require('../App/Components/Stories')
}, module)
// This assumes that storybook is running on the same host as your RN packager,
// to set manually use, e.g. host: 'localhost' option
const StorybookUI = getStorybookUI({ port: 7007, onDeviceUI: true })
AppRegistry.registerComponent('KRACK', () => StorybookUI)
export default StorybookUI
/* eslint-disable global-require */
import React, { Component } from 'react';
import { AppRegistry } from 'react-native';
import { getStorybookUI, configure } from '@storybook/react-native';
import { ThemeProvider } from '../src';
// import stories
configure(() => {
require('./stories');
}, module);
// This assumes that storybook is running on the same host as your RN packager,
// to set manually use, e.g. host: 'localhost' option
const StorybookUIRoot = getStorybookUI({
port: 7007,
onDeviceUI: true,
});
// react-native hot module loader must take in a Class - https://github.com/facebook/react-native/issues/10991
// https://github.com/storybooks/storybook/issues/2081
// eslint-disable-next-line react/prefer-stateless-function
class StorybookUIHMRRoot extends Component {
render() {
return (
);
}
}
addDecorator,
configure,
getStorybookUI,
} from '@storybook/react-native';
import { AppRegistry } from 'react-native';
import { withKnobs } from '@storybook/addon-knobs';
// import stories
configure(() => {
require('./stories');
}, module);
// Refer to https://github.com/storybookjs/storybook/tree/master/app/react-native#start-command-parameters
// To find allowed options for getStorybookUI
const StorybookUIRoot = getStorybookUI({ port: 7007, host: 'localhost' });
// 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.
AppRegistry.registerComponent('%APP_NAME%', () => StorybookUIRoot);
addDecorator(withKnobs);
export default StorybookUIRoot;
/* eslint-disable import/no-extraneous-dependencies */
import { getStorybookUI, configure } from '@storybook/react-native';
import { loadStories } from './storyLoader';
import './addons';
import './rn-addons';
// import stories
configure(() => {
loadStories();
}, module);
// Refer to https://github.com/storybooks/storybook/tree/master/app/react-native#start-command-parameters
// To find allowed options for getStorybookUI
const StorybookUIRoot = getStorybookUI({});
export default StorybookUIRoot;
export function getStorybook(resolveFunction, moduleName, options) {
configureStoriesWithDecorators(resolveFunction, moduleName);
return getStorybookUI({...options, asyncStorage: require('@react-native-community/async-storage').default});
}
import { configure, getStorybookUI } from "@storybook/react-native"
configure(() => {
require("./storybook-registry")
})
export const StorybookUI = getStorybookUI({ port: 9001, host: "localhost", onDeviceUI: true })