Centralize shared WebUI structural primitives

This commit is contained in:
2026-08-18 13:17:31 +02:00
parent ee5c881df9
commit 7685a103e8
26 changed files with 767 additions and 81 deletions
+4 -3
View File
@@ -1,5 +1,6 @@
import type { ReactNode } from "react";
import FieldLabel from "./help/FieldLabel";
import ActionToolbar from "./ActionToolbar";
type PolicySectionProps = {
title?: ReactNode;
@@ -44,15 +45,15 @@ export function PolicySection({
actions,
children,
className = "",
headingClassName = "subsection-heading split"
headingClassName = ""
}: PolicySectionProps) {
return (
<section className={["policy-section", className].filter(Boolean).join(" ")}>
{(title || summary || actions) &&
<div className={headingClassName}>
<ActionToolbar surface="section-header" className={headingClassName}>
{title && <h3>{title}</h3>}
{actions ?? summary}
</div>
</ActionToolbar>
}
{children}
</section>);