import { addDecorator , configure , getStorybookUI } from "@storybook/react-native" ; import React from "react" ; import { AppRegistry , View , ViewProps } from "react-native" ; const style = { backgroundColor : "#f4f4f4" , flex : 1 , paddingHorizontal : 12 , paddingVertical : 50 } ; const Wrapper = ( { children } ) => ( < View style = { style } > { children } < /View>); addDecorator ( fn => < Wrapper > { fn ( ) } < /Wrapper>); configure ( ( ) => { require ( "./stories" ) ; } , module ) ; const StorybookUIRoot = getStorybookUI ( { } ) ; AppRegistry . registerComponent ( "%APP_NAME%" , ( ) => StorybookUIRoot ) ; export default StorybookUIRoot ;