import * as React from 'react'; import { FormHelperText, FormLabel } from '@mui/joy'; import { SxProps } from '@mui/joy/styles/types'; import InfoIcon from '@mui/icons-material/Info'; import { GoodTooltip } from '~/common/components/GoodTooltip'; import { formLabelStartWidth } from '~/common/app.theme'; /** * Shared label part (left side) */ const FormLabelStartBase = (props: { title: string | React.JSX.Element, description?: string | React.JSX.Element tooltip?: string | React.JSX.Element, onClick?: (event: React.MouseEvent) => void, sx?: SxProps, }) =>
{/* Title */} {props.title} {props.tooltip && ( )} {/* [SubTitle] */} {!!props.description && ( {props.description} )}
; FormLabelStartBase.displayName = 'FormLabelStart'; export const FormLabelStart = React.memo(FormLabelStartBase);