import { ForwardedRef, forwardRef } from 'react'; import { useTranslation } from '../../../translation/TranslationProvider'; import { cx } from '../../utils/styleUtils'; import './TitleCard.scss'; interface TitleCardProps { title?: string; label?: 'now' | 'next'; secondary?: string; className?: string; } const TitleCard = forwardRef((props: TitleCardProps, ref: ForwardedRef) => { const { label, title, secondary, className = '' } = props; const { getLocalizedString } = useTranslation(); const accent = label === 'now'; return (
{title} {label && getLocalizedString(`common.${label}`)}
{secondary}
); }); TitleCard.displayName = 'TitleCard'; export default TitleCard;