Files
kandev/apps/web/components/settings/settings-section.tsx
T
Carlos Florêncio 3d9dfb2171 feat: settings page
2026-01-10 23:17:26 +00:00

30 lines
754 B
TypeScript

import { ReactNode } from 'react';
type SettingsSectionProps = {
icon?: ReactNode;
title: string;
description?: string;
action?: ReactNode;
children: ReactNode;
};
export function SettingsSection({ icon, title, description, action, children }: SettingsSectionProps) {
return (
<section className="space-y-4">
<div className="flex items-start justify-between">
<div>
<h3 className="text-lg font-semibold flex items-center gap-2">
{icon}
{title}
</h3>
{description && (
<p className="text-sm text-muted-foreground mt-1">{description}</p>
)}
</div>
{action && <div>{action}</div>}
</div>
{children}
</section>
);
}