import { FC } from 'react'; import cx from 'classnames'; import { ElementContent, withStaticProps } from '../../types'; import Link from '../link/link'; import { LinkTarget } from '../link/LinkConstants'; import styles from './information-box-title.module.scss'; type InformationBoxTitleProps = { children: ElementContent; href?: string; linkTarget?: LinkTarget; }; const InformationBoxTitle: FC & { linkTargets?: typeof LinkTarget } = ({ children, href, linkTarget, }) => { return href && typeof children === 'string' ? ( {children} ) : (

{children}

); }; export default withStaticProps(InformationBoxTitle, { linkTargets: LinkTarget });