import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; import { Typography } from '@mui/material'; import { equals, type } from 'ramda'; import type { ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; import { Tooltip } from '../components'; interface Props { children: ReactNode; secondaryLabel?: string | Array; } const Subtitle = ({ children, secondaryLabel }: Props): JSX.Element => { const { t } = useTranslation(); const containsSeveralSecondaryLabels = equals(type(secondaryLabel), 'Array'); return ( {children} {secondaryLabel && ( ).map((label) => (

{t(label)}

)) : t(secondaryLabel) } placement="right" >
)}
); }; export default Subtitle;