import React from 'react'; import { FlatList } from 'react-native'; import * as List from '.'; import SafeAreaView from '../SafeAreaView'; import { longText } from '../../../.storybook/utils'; import { ThemeContext, TSupportedThemes } from '../../theme'; import { DimensionsContext } from '../../dimensions'; import { themes } from '../../lib/constants'; export default { title: 'List' }; export const TitleAndSubtitle = () => ( ); export const Alert = () => ( } alert /> } alert /> ); export const Pressable = () => ( alert('Hi there!')} translateTitle={false} /> alert('Hi there!')} disabled translateTitle={false} /> ); export const Header = () => ( ); export const Icon = () => ( ); export const Separator = () => ( ); export const SectionAndInfo = () => ( ); export const WithIcon = () => ( } /> } /> } right={() => } /> ); export const WithCustomColors = () => ( alert('Press')} backgroundColor='red' underlayColor='green' translateTitle={false} /> ); const ListItemFull = ({ ...props }) => ( alert('Hi')} left={() => } right={() => } {...props} /> ); const ListFull = () => ( ); const ThemeStory = ({ theme }: { theme: TSupportedThemes }) => ( ); export const WithDarkTheme = () => ; export const WithBlackTheme = () => ; const FontStory = ({ fontScale }: { fontScale: number }) => ( // @ts-ignore ); /** * It's going to test height only. * Font scale on text and icons is applied based on OS setting */ export const WithSmallFont = () => ; export const WithBiggerFont = () => ; export const WithFlatList = () => ( } ListHeaderComponent={List.Separator} ListFooterComponent={List.Separator} ItemSeparatorComponent={List.Separator} /> );