Skip to content

Instantly share code, notes, and snippets.

@trooperandz
Created November 14, 2021 22:45
Show Gist options
  • Save trooperandz/229a2e67476b3af10acccefeae5f746c to your computer and use it in GitHub Desktop.
Save trooperandz/229a2e67476b3af10acccefeae5f746c to your computer and use it in GitHub Desktop.
React Native Storybook CenterView file
// storybook/CenterView/index.js
import React from 'react';
import { StyleSheet, View } from 'react-native';
export const CenterView = ({ children }) => {
return <View style={styles.container}>{children}</View>;
};
const styles = StyleSheet.create({
container: {
alignItems: 'center',
backgroundColor: '#F4F4F9',
flex: 1,
justifyContent: 'center',
padding: 24,
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment