import React from 'react'; import { Dimensions, SafeAreaView } from 'react-native'; import { storiesOf } from '@storybook/react-native'; import { Provider } from 'react-redux'; import { SafeAreaProvider } from 'react-native-safe-area-context'; import { Header, HeaderBackground } from '@react-navigation/elements'; import { longText } from '../../../storybook/utils'; import { ThemeContext } from '../../theme'; import { store } from '../../../storybook/stories'; import { colors, themes } from '../../lib/constants'; import RoomHeaderComponent from './RoomHeader'; const stories = storiesOf('RoomHeader', module) .addDecorator(story => {story()}) .addDecorator(story => {story()}); const { width, height } = Dimensions.get('window'); const HeaderExample = ({ title, theme = 'light' }) => (
} /> ); const RoomHeader = ({ ...props }) => ( alert('header pressed!')} status={props.status} usersTyping={props.usersTyping} {...props} /> ); stories.add('title and subtitle', () => ( <> } /> } /> } /> } /> } /> )); stories.add('icons', () => ( <> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> )); stories.add('typing', () => ( <> } /> } /> } /> )); stories.add('landscape', () => ( <> } /> } /> } /> )); stories.add('thread', () => ( <> } /> } /> )); const ThemeStory = ({ theme }) => ( } theme={theme} /> ); stories.add('themes', () => ( <> ));