/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions, react/prop-types */
import React from 'react';
import { FlatList } from 'react-native';
import { storiesOf } from '@storybook/react-native';
import * as List from '../../app/containers/List';
import SafeAreaView from '../../app/containers/SafeAreaView';
import { longText } from '../utils';
import { ThemeContext } from '../../app/theme';
import { DimensionsContext } from '../../app/dimensions';
const stories = storiesOf('List', module);
stories.add('title and subtitle', () => (
));
stories.add('pressable', () => (
alert('Hi there!')} translateTitle={false} />
alert('Hi there!')} disabled translateTitle={false} />
));
stories.add('header', () => (
));
stories.add('icon', () => (
));
stories.add('separator', () => (
));
stories.add('with section and info', () => (
));
stories.add('with icon', () => (
} />
} />
}
right={() => }
/>
));
stories.add('with custom colors', () => (
alert('Press')}
backgroundColor='red'
underlayColor='green'
translateTitle={false}
/>
));
const ListItemFull = ({ ...props }) => (
alert('Hi')}
left={() => }
right={() => }
{...props}
/>
);
const ListFull = () => (
);
const ThemeStory = ({ theme }) => (
);
stories.add('with dark theme', () => );
stories.add('with black theme', () => );
const FontStory = ({ fontScale }) => (
);
/**
* It's going to test height only.
* Font scale on text and icons is applied based on OS setting
*/
stories.add('with small font', () => );
stories.add('with bigger font', () => );
stories.add('with FlatList', () => (
}
ListHeaderComponent={List.Separator}
ListFooterComponent={List.Separator}
ItemSeparatorComponent={List.Separator}
keyExtractor={item => item}
/>
));