22 lines
524 B
TypeScript
22 lines
524 B
TypeScript
|
|
import type { ReactNode } from 'react'
|
||
|
|
|
||
|
|
interface SectionProps {
|
||
|
|
title: string
|
||
|
|
description?: string
|
||
|
|
children: ReactNode
|
||
|
|
}
|
||
|
|
|
||
|
|
export function Section({ title, description, children }: SectionProps) {
|
||
|
|
return (
|
||
|
|
<div className="section">
|
||
|
|
<div className="mb-4">
|
||
|
|
<h2 className="text-sm font-medium text-text">{title}</h2>
|
||
|
|
{description && (
|
||
|
|
<p className="text-xs text-muted mt-1">{description}</p>
|
||
|
|
)}
|
||
|
|
</div>
|
||
|
|
<div className="space-y-4">{children}</div>
|
||
|
|
</div>
|
||
|
|
)
|
||
|
|
}
|