@storybook/react-native
Version:
A better way to develop React Native Components for your app
32 lines (27 loc) • 572 B
JavaScript
import React from 'react';
import { View } from 'react-native';
import { MyButton } from './Button';
const MyButtonMeta = {
title: 'MyButton',
component: MyButton,
argTypes: {
onPress: { action: 'pressed the button' },
},
args: {
text: 'Hello world',
},
decorators: [
(Story) => (
<View style={{ alignItems: 'center', justifyContent: 'center', flex: 1 }}>
<Story />
</View>
),
],
};
export default MyButtonMeta;
export const Basic = {};
export const AnotherExample = {
args: {
text: 'Another example',
},
};