import React, { ComponentProps, PropsWithChildren, useCallback } from 'react'; import { MaterialCommunityIcons } from '@expo/vector-icons'; import { List } from 'react-native-paper'; import GestureHandlerAdapterNucleon from './GestureHandlerAdapterNucleon'; export type ListItemNucleonProps = PropsWithChildren< Omit, 'left' | 'description'> & { leftIconName: ComponentProps['name']; rightIconName?: ComponentProps['name']; } >; type IconRendererProps = Omit, 'icon'>; export default function ListItemNucleon({ leftIconName, rightIconName, right, children, ...listProps }: ListItemNucleonProps) { const left = useCallback( (lp: IconRendererProps) => , [leftIconName] ); const syntheticRight = useCallback( (rp: IconRendererProps) => rightIconName && , [rightIconName] ); return ( ); }