import React from 'react'; import { Text, View } from 'react-native'; import { themes } from '../../lib/constants'; import { CustomIcon } from '../CustomIcon'; import { useTheme } from '../../theme'; import { TActionSheetOptionsItem } from './Provider'; import styles from './styles'; import Touch from '../Touch'; export interface IActionSheetItem { item: TActionSheetOptionsItem; hide(): void; } export const Item = React.memo(({ item, hide }: IActionSheetItem) => { const { theme } = useTheme(); const onPress = () => { hide(); item?.onPress(); }; return ( {item.icon ? ( ) : null} {item.title} {item.right ? {item.right ? item.right() : null} : null} ); });