Can I change the backgroundColor of all stories in React Native?
I'm using rn-splash-screen to show a splash screen, the problem is that it modifies the background of react native
Hey, currently there is no way to do that. The styles are defined here:
https://github.com/storybooks/storybook/blob/master/app/react-native/src/preview/components/StoryView/style.js
Maybe you can think of a way how to change the styles?
To have Storybook to work with rn-splash-screen you need to hide the splash screen during the Storybook initialization.
Example:
import { AppRegistry } from 'react-native';
import { getStorybookUI, configure } from '@storybook/react-native';
import SplashScreen from 'rn-splash-screen';
// import stories
configure(() => {
require('./stories');
}, module);
SplashScreen.hide();
const StorybookUI = getStorybookUI({ port: 7007, host: 'localhost' });
AppRegistry.registerComponent('Bexco', () => StorybookUI);
export default StorybookUI;
Most helpful comment
Hey, currently there is no way to do that. The styles are defined here:
https://github.com/storybooks/storybook/blob/master/app/react-native/src/preview/components/StoryView/style.js
Maybe you can think of a way how to change the styles?