2021-04-07 18:31:25 +00:00
|
|
|
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions, react/prop-types */
|
|
|
|
import React from 'react';
|
|
|
|
import { storiesOf } from '@storybook/react-native';
|
|
|
|
|
|
|
|
import { ThemeContext } from '../../theme';
|
|
|
|
import { longText } from '../../../storybook/utils';
|
2021-09-13 20:41:05 +00:00
|
|
|
import BackgroundContainer from '.';
|
2021-04-07 18:31:25 +00:00
|
|
|
|
|
|
|
const stories = storiesOf('BackgroundContainer', module);
|
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
stories.add('basic', () => <BackgroundContainer />);
|
2021-04-07 18:31:25 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
stories.add('loading', () => <BackgroundContainer loading />);
|
2021-04-07 18:31:25 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
stories.add('text', () => <BackgroundContainer text='Text here' />);
|
2021-04-07 18:31:25 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
stories.add('long text', () => <BackgroundContainer text={longText} />);
|
2021-04-07 18:31:25 +00:00
|
|
|
|
|
|
|
const ThemeStory = ({ theme, ...props }) => (
|
2021-09-13 20:41:05 +00:00
|
|
|
<ThemeContext.Provider value={{ theme }}>
|
2021-04-07 18:31:25 +00:00
|
|
|
<BackgroundContainer {...props} />
|
|
|
|
</ThemeContext.Provider>
|
|
|
|
);
|
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
stories.add('dark theme - loading', () => <ThemeStory theme='dark' loading />);
|
2021-04-07 18:31:25 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
stories.add('dark theme - text', () => <ThemeStory theme='dark' text={longText} />);
|
2021-04-07 18:31:25 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
stories.add('black theme - loading', () => <ThemeStory theme='black' loading />);
|
2021-04-07 18:31:25 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
stories.add('black theme - text', () => <ThemeStory theme='black' text={longText} />);
|