import type {PortableTextListComponent, PortableTextListItemComponent} from '@portabletext/react' import type {PortableTextListItemType} from '@portabletext/types' import {Text, View} from 'react-native' import {listStyles} from './styles' export const DefaultList: PortableTextListComponent = ({value, children}) => { const base = value.level > 1 ? listStyles.listDeep : listStyles.list const padding = {paddingLeft: 16 * value.level} return {children} } export const defaultListItems: Record< PortableTextListItemType, PortableTextListItemComponent | undefined > = { bullet: ({children}) => ( {'\u00B7'} {children} ), number: ({children, index}) => ( {index + 1}. {children} ), }