2017-08-17 19:31:27 +00:00
|
|
|
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */
|
2017-12-08 19:36:03 +00:00
|
|
|
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';
|
|
|
|
|
2019-03-29 19:36:07 +00:00
|
|
|
import RoomItem from './RoomItem';
|
2018-09-11 16:32:52 +00:00
|
|
|
import Message from './Message';
|
2019-04-08 12:35:28 +00:00
|
|
|
// import RoomViewHeader from './RoomViewHeader';
|
2017-08-17 19:31:27 +00:00
|
|
|
|
2019-12-04 16:39:53 +00:00
|
|
|
// Change here to see themed storybook
|
|
|
|
const theme = 'light';
|
|
|
|
|
2019-03-29 19:36:07 +00:00
|
|
|
const reducers = combineReducers({
|
|
|
|
settings: () => ({}),
|
|
|
|
login: () => ({
|
|
|
|
user: {
|
|
|
|
username: 'diego.mello'
|
|
|
|
}
|
|
|
|
}),
|
2019-09-16 20:26:32 +00:00
|
|
|
meteor: () => ({ connected: true }),
|
|
|
|
activeUsers: () => ({ abc: 'online' })
|
2019-03-29 19:36:07 +00:00
|
|
|
});
|
2017-12-08 19:36:03 +00:00
|
|
|
const store = createStore(reducers);
|
|
|
|
|
2019-03-29 19:36:07 +00:00
|
|
|
storiesOf('RoomItem', module)
|
|
|
|
.addDecorator(story => <Provider store={store}>{story()}</Provider>)
|
2019-12-04 16:39:53 +00:00
|
|
|
.add('list', () => <RoomItem theme={theme} />);
|
2018-09-11 16:32:52 +00:00
|
|
|
storiesOf('Message', module)
|
2019-12-04 16:39:53 +00:00
|
|
|
.add('list', () => <Message theme={theme} />);
|
2019-04-08 12:35:28 +00:00
|
|
|
// FIXME: I couldn't make these pass on jest :(
|
|
|
|
// storiesOf('RoomViewHeader', module)
|
2019-12-04 16:39:53 +00:00
|
|
|
// .add('list', () => <RoomViewHeader theme='black' />);
|