Skip to content

Instantly share code, notes, and snippets.

@axelnormand
Created July 30, 2018 10:32
Show Gist options
  • Save axelnormand/8194d3cef1b17a0eeb6724c9084f6d90 to your computer and use it in GitHub Desktop.
Save axelnormand/8194d3cef1b17a0eeb6724c9084f6d90 to your computer and use it in GitHub Desktop.
React Native Storybook
import { storiesOf } from '@storybook/react-native';
import React from 'react';
import { Text, View } from 'react-native';
const TestComponent: React.SFC<{}> = () => <Text>Hello world!</Text>;
/**
* A test story for testTemplate to use
*
* Test Decorator should not be in snapshot be design
*/
storiesOf('TestComponent', module)
.addDecorator(story => <View testID="Testing-Decorator">{story()}</View>)
.add('renders', () => <TestComponent />);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment