import { CSSProperties, ReactNode } from 'react'
import IonIcon from '@sentre/antd-ionicon'
import { Col, Row, Tooltip, Typography } from 'antd'
type MenuItemProps = {
icon?: ReactNode
children?: ReactNode
style?: CSSProperties
value?: string
onClick?: (val: string) => void
name?: boolean
disabled?: boolean
postfix?: ReactNode
tooltip?: ReactNode | boolean
}
const MenuItem = ({
icon = ,
children = '',
style,
value = '',
onClick = () => {},
name = true,
disabled = false,
postfix = '',
tooltip = false,
}: MenuItemProps) => {
const textType = disabled ? 'secondary' : undefined
return (
!disabled && onClick(value)}
>
{icon}
{name && (
{children || value}
{postfix}
)}
)
}
export default MenuItem