/* 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'; import { storiesOf } from '@storybook/react-native'; import RoomItem from './RoomItem'; import Message from './Message'; import UiKitMessage from './UiKitMessage'; import UiKitModal from './UiKitModal'; import Markdown from './Markdown'; // import RoomViewHeader from './RoomViewHeader'; import MessageContext from '../../app/containers/message/Context'; // MessageProvider const baseUrl = 'https://open.rocket.chat'; const user = { id: '', username: 'diego.mello', token: '' }; // Change here to see themed storybook const theme = 'light'; const reducers = combineReducers({ settings: () => ({}), login: () => ({ user: { username: 'diego.mello' } }), meteor: () => ({ connected: true }), activeUsers: () => ({ abc: { status: 'online', statusText: 'dog' } }) }); const store = createStore(reducers); const messageDecorator = story => ( {}, onLongPress: () => {}, reactionInit: () => {}, onErrorPress: () => {}, replyBroadcast: () => {}, onReactionPress: () => {}, onDiscussionPress: () => {}, onReactionLongPress: () => {} }} > {story()} ); storiesOf('RoomItem', module) .addDecorator(story => {story()}) .add('list roomitem', () => ); storiesOf('Message', module) .addDecorator(messageDecorator) .add('list message', () => ); storiesOf('UiKitMessage', module) .addDecorator(messageDecorator) .add('list uikitmessage', () => ); storiesOf('UiKitModal', module) .addDecorator(messageDecorator) .add('list UiKitModal', () => ); storiesOf('Markdown', module) .add('list Markdown', () => ); // FIXME: I couldn't make these pass on jest :( // storiesOf('RoomViewHeader', module) // .add('list', () => );