import { PropsWithChildren } from 'react'
import MaterialIcon from '@/shared/components/material-icon'
type Props = {
onClick?: () => void
icon?: string
svgIcon?: React.ReactElement | null
disabled?: boolean
disabledAccesibilityText?: string
type?: 'button' | 'link'
href?: string
}
function LeftMenuButtonIcon({
svgIcon,
icon,
}: {
svgIcon?: React.ReactElement | null
icon?: string
}) {
if (svgIcon) {
return
{svgIcon}
} else if (icon) {
return
} else return null
}
export default function LeftMenuButton({
children,
svgIcon,
onClick,
icon,
disabled = false,
disabledAccesibilityText,
type = 'button',
href,
}: PropsWithChildren) {
if (disabled) {
return (
{children}
{disabledAccesibilityText ? (
{disabledAccesibilityText}
) : null}
)
}
if (type === 'button') {
return (
)
} else {
return (
{children}
)
}
}