/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions, react/prop-types, react/destructuring-assignment */ import React from 'react'; import { View, Dimensions } from 'react-native'; import { storiesOf } from '@storybook/react-native'; import RoomHeaderComponent from './RoomHeader'; import Header from '../Header'; import { longText } from '../../../storybook/utils'; import { ThemeContext } from '../../theme'; const stories = storiesOf('RoomHeader', module); // TODO: refactor after react-navigation v6 const HeaderExample = ({ title }) => (
( {title()} )} /> ); const { width, height } = Dimensions.get('window'); const RoomHeader = ({ ...props }) => ( alert('header pressed!')} {...props} /> ); stories.add('title and subtitle', () => ( <> } /> } /> } /> } /> } /> )); stories.add('icons', () => ( <> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> )); stories.add('typing', () => ( <> } /> } /> } /> )); stories.add('landscape', () => ( <> } /> } /> } /> )); stories.add('thread', () => ( <> } /> } /> )); const ThemeStory = ({ theme }) => ( } /> ); stories.add('themes', () => ( <> ));