import React, { PropsWithChildren } from 'react' import { Header } from '@app/components/general/header' type PageTitleProps = { title?: string rightButton?: JSX.Element | null component?: 'h1' | 'h2' | 'h3' className?: string id?: string } 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 }