import { Icon, IconProps } from '@bentwnghk/ui'; import { createStyles } from 'antd-style'; import { ChevronRight } from 'lucide-react'; import { ReactNode, memo } from 'react'; import { Flexbox } from 'react-layout-kit'; import Divider from './Divider'; const useStyles = createStyles(({ css, token }) => ({ container: css` position: relative; border-radius: 0; font-size: 15px; &:active { background: ${token.colorFillTertiary}; } `, })); export interface CellProps { icon?: IconProps['icon']; key?: string | number; label?: string | ReactNode; onClick?: () => void; type?: 'divider'; } const Cell = memo(({ label, icon, onClick, type }) => { const { cx, styles, theme } = useStyles(); if (type === 'divider') return ; return ( {icon && } {label} ); }); export default Cell;