import { PropsWithChildren } from 'react' import { Header } from './header' type PageTitleProps = { title?: string rightButton?: JSX.Element | null className?: string id?: string } const classes = { title: 'text-xl md:text-2xl lg:text-3xl xl:text-4xl', topBlock: 'overflow-none', } function PageTitle({ title = '', rightButton = null, children, className = '', id, }: PropsWithChildren) { const renderTitle = title || children if (!renderTitle) { return null } if (rightButton) { return (
<>
{renderTitle}
{rightButton}
) } return (
{renderTitle}
) } export { PageTitle }