// @flow
import React, { Fragment } from 'react';
import { View } from 'react-native';
import type { storiesOf as StoriesOf } from '@storybook/react';
import { Container } from '../common/';
import { Typography } from '../../src/';

const loremipsum = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.';

export default function (storiesOf: StoriesOf) {
  storiesOf('Typography', module)
    .addDecorator(story => <Container>{story()}</Container>)
    .add('styles', () => (
      <Fragment>
        <View><Typography type="display4" text="Display 4" /></View>
        <View><Typography type="display3" text="Display 3" /></View>
        <View><Typography type="display2" text="Display 2" /></View>
        <View><Typography type="display1" text="Display 1" /></View>
        <View><Typography type="headline" text="Headline" /></View>
        <View><Typography type="title" text="Title" /></View>
        <View><Typography type="subheading" text="Subheading" /></View>
        <View><Typography type="body2" text={`Body 2 paragraph. ${loremipsum}`} /></View>
        <View style={{ width: '100%' }}><Typography type="body1" text={`Body 1 paragraph. ${loremipsum}`} /></View>
        <View style={{ marginBottom: 12 }}><Typography type="caption" text="Caption" /></View>
        <View style={{ marginBottom: 12 }}><Typography type="button" text="Button" /></View>
      </Fragment>
    ));
}
