import Title from "@/components/Title"
import styles from "./styles.module.scss"

interface ProfileBlockProps {
    title: string
    description?: string
    children?: React.ReactNode
}

function ProfileBlock({ title, description, children }: ProfileBlockProps) {
    return (
        <section className={styles.container}>
            <header className={styles.header}>
                <Title variant="h2" className={styles.title}>{title}</Title>
                {description && <p className={styles.description}>{description}</p>}
            </header>
            {!!children && <div className={styles.content}>
                {children}
            </div>}
        </section>
    )
}

export default ProfileBlock