Skip to content

Instantly share code, notes, and snippets.

@suprith-s-reddy
Created June 27, 2021 19:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suprith-s-reddy/63194fcc73b8b6322e0f7c77a8e63314 to your computer and use it in GitHub Desktop.
Save suprith-s-reddy/63194fcc73b8b6322e0f7c77a8e63314 to your computer and use it in GitHub Desktop.
Button Stories
import React from 'react';
import { View } from 'react-native';
import { storiesOf } from '@storybook/react-native';
import { Button, Text } from '@src/components/atoms';
storiesOf('Button', module)
.add('Basic button', () => (
<View style={{ padding: 10 }}>
<Button>
<Text>Press me!</Text>
</Button>
<Button style={{ marginTop: 10, width: '75%' }}>
<Text>Press me!</Text>
</Button>
<Button style={{ marginTop: 10, width: '50%' }}>
<Text>Press me!</Text>
</Button>
</View>
))
.add('Transparent button', () => (
<View style={{ padding: 10 }}>
<Text isPrimary>Press me!</Text>
</View>
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment