https://github.com/GeekyAnts/NativeBase
Raw File
Tip revision: 592cc0acc27e247a4291ff5c26f6647de91a65e7 authored by Suraj Ahmed Choudhury on 03 February 2022, 10:13:17 UTC
Merge pull request #4602 from GeekyAnts/release/3.3.5
Tip revision: 592cc0a
index.ts
// if you use expo remove this line
import { AppRegistry } from 'react-native';

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

import './rn-addons';
import AsyncStorage from '@react-native-async-storage/async-storage';

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

// 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({
  // DOC: Uncomment this to get normal app view
  // onDeviceUI: false,
  asyncStorage: AsyncStorage,
});

// 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 should remove this line.
AppRegistry.registerComponent('%APP_NAME%', () => StorybookUIRoot);

export default StorybookUIRoot;
back to top