import React from 'react'; import PropTypes from 'prop-types'; import { Text, View } from 'react-native'; import { themes } from '../../constants/colors'; import { CustomIcon } from '../../lib/Icons'; import styles from './styles'; import { Button } from './Button'; export const Item = React.memo(({ item, hide, theme }) => { const onPress = () => { hide(); item?.onPress(); }; return ( ); }); Item.propTypes = { item: PropTypes.shape({ title: PropTypes.string, icon: PropTypes.string, danger: PropTypes.bool, onPress: PropTypes.func, right: PropTypes.func, testID: PropTypes.string }), hide: PropTypes.func, theme: PropTypes.string };