import clsx from 'clsx' import { ComponentProps, ReactNode } from 'react' import { useTranslation } from 'react-i18next' import { TooltipInfoIcon } from '../tooltip/TooltipInfoIcon' export interface InputLabelProps extends Omit, 'children' | 'title'> { mono?: boolean name?: string tooltip?: ReactNode containerProps?: Omit, 'children'> children?: ReactNode | ReactNode[] optional?: boolean primary?: boolean title?: boolean } export const InputLabel = ({ className, mono, name, tooltip, containerProps: { className: labelClassName, ...containerProps } = {}, children, optional, primary, title, ...rest }: InputLabelProps) => { const { t } = useTranslation() return (

{name} {children} {optional && ` (${t('form.optional')})`}

{tooltip && }
) }