2026-10-15 13:58:01 +00:00
|
|
|
import type { ReactNode } from "react";
|
|
|
|
|
|
|
|
|
|
/** Título común para grupos de un diálogo, independiente de su nivel semántico. */
|
|
|
|
|
export function FormSectionTitle({
|
|
|
|
|
children,
|
|
|
|
|
id,
|
|
|
|
|
as: Heading = "h3",
|
2026-10-17 11:58:29 +00:00
|
|
|
layout = Heading === "span" ? "inline" : "standalone",
|
2026-10-15 13:58:01 +00:00
|
|
|
}: {
|
|
|
|
|
children: ReactNode;
|
|
|
|
|
id?: string;
|
2026-10-15 14:14:26 +00:00
|
|
|
as?: "h3" | "h4" | "h5" | "legend" | "span";
|
2026-10-17 11:58:29 +00:00
|
|
|
layout?: "standalone" | "inline";
|
2026-10-15 13:58:01 +00:00
|
|
|
}) {
|
|
|
|
|
return (
|
|
|
|
|
<Heading
|
2026-10-17 11:58:29 +00:00
|
|
|
className={`text-xs font-semibold uppercase tracking-wide text-muted-foreground ${layout === "inline" ? "" : "mb-4"}`}
|
2026-10-15 13:58:01 +00:00
|
|
|
id={id}
|
|
|
|
|
>
|
|
|
|
|
{children}
|
|
|
|
|
</Heading>
|
|
|
|
|
);
|
|
|
|
|
}
|