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