import {memo} from 'react'; import {Pressable, Text} from 'react-native'; import {renderIcon} from '../../helpers/renderIcon'; import {drawerStyles} from '../../theme'; import type {DrawerItemProps} from '../../types'; const DrawerItemComponent = ({ icon, textColor, fontSize, handleDrawer, iconSize, text, onPress, }: DrawerItemProps) => { const handlePress = () => { onPress?.(); handleDrawer(); }; return ( {renderIcon(icon, {size: iconSize, color: textColor})} {text} ); }; export const DrawerItem = memo(DrawerItemComponent);