Files
stack/packages/ui/src/components/SectionHeader.tsx
Jason Woltje 716f230f72
All checks were successful
ci/woodpecker/push/orchestrator Pipeline was successful
ci/woodpecker/push/api Pipeline was successful
ci/woodpecker/push/web Pipeline was successful
feat(ui,web): Phase 2 — Shared Components & Terminal Panel (#449) (#452)
Co-authored-by: Jason Woltje <jason@diversecanvas.com>
Co-committed-by: Jason Woltje <jason@diversecanvas.com>
2026-02-22 21:12:13 +00:00

63 lines
1.2 KiB
TypeScript

import type { ReactElement, ReactNode } from "react";
export interface SectionHeaderProps {
title: string;
subtitle?: string;
actions?: ReactNode;
className?: string;
}
export function SectionHeader({
title,
subtitle,
actions,
className = "",
}: SectionHeaderProps): ReactElement {
return (
<div
className={className}
style={{
display: "flex",
alignItems: "center",
gap: 12,
marginBottom: 16,
}}
>
<div>
<div
style={{
fontSize: "0.95rem",
fontWeight: 700,
color: "var(--text)",
}}
>
{title}
</div>
{subtitle !== undefined && (
<div
style={{
fontSize: "0.78rem",
color: "var(--muted)",
marginTop: 2,
}}
>
{subtitle}
</div>
)}
</div>
{actions !== undefined && (
<div
style={{
marginLeft: "auto",
display: "flex",
gap: 8,
alignItems: "center",
}}
>
{actions}
</div>
)}
</div>
);
}