Rocket.Chat.ReactNative/storybook/stories/index.js

22 lines
889 B
JavaScript
Raw Normal View History

2017-08-17 19:31:27 +00:00
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */
import React from 'react';
import { Provider } from 'react-redux';
import { createStore, combineReducers } from 'redux';
2017-08-17 19:31:27 +00:00
import { storiesOf } from '@storybook/react-native';
import DirectMessage from './Channels/DirectMessage';
import Avatar from './Avatar';
import Message from './Message';
2017-08-17 19:31:27 +00:00
2018-06-13 01:29:18 +00:00
const reducers = combineReducers({ settings: () => ({}), login: () => ({ user: {} }), meteor: () => ({ connected: true }) });
const store = createStore(reducers);
storiesOf('Avatar', module).addDecorator(story => <Provider store={store}>{story()}</Provider>).add('avatar', () => Avatar);
storiesOf('Channel Cell', module).addDecorator(story => <Provider store={store}>{story()}</Provider>).add('Direct Messages', () => DirectMessage);
storiesOf('Message', module)
.add('list', () => Message);