import { PropsWithChildren } from 'react' import Icon from '../../../shared/components/icon' import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher' import MaterialIcon from '@/shared/components/material-icon' type Props = { onClick?: () => void icon?: { type: string fw?: boolean } svgIcon?: React.ReactElement | null disabled?: boolean disabledAccesibilityText?: string type?: 'button' | 'link' href?: string } function LeftMenuButtonIcon({ svgIcon, icon, }: { svgIcon?: React.ReactElement | null icon?: { type: string; fw?: boolean } }) { if (svgIcon) { return
{svgIcon}
} else if (icon) { return ( } bs5={} /> ) } 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} ) } }