import React, { memo } from 'react'; import { TouchableOpacity, View } from 'react-native'; import Theme from '../../core/theme'; import type { PopoverItemProps } from './interface'; import { varCreator, styleCreator } from './styles/popover.style'; const PopoverItem = ({ children, value, disabled, dark, style, divider = false, onSelect, }: React.PropsWithChildren>) => { const TOKENS = Theme.useThemeTokens(); const CV = Theme.createVar(TOKENS, varCreator); // @ts-ignore const STYLES = Theme.createStyle(CV, styleCreator); return ( { if (typeof onSelect === 'function') { onSelect(value); } }} style={style} > {children} ); }; export default memo(PopoverItem) as ( p: React.PropsWithChildren> ) => React.ReactElement;