Files
Stirling-PDF/frontend/shared/components/SectionHeader.stories.tsx
T
ddf78d11ae SaaS fixes (#6578)
Co-authored-by: Claude Opus 4.8 <[email protected]>
Co-authored-by: James Brunton <[email protected]>
Co-authored-by: Reece Browne <[email protected]>
Co-authored-by: ConnorYoh <[email protected]>
Co-authored-by: Reece <[email protected]>
Co-authored-by: EthanHealy01 <[email protected]>
Co-authored-by: Ludy <[email protected]>
2026-06-16 16:41:25 +01:00

37 lines
884 B
TypeScript

import { useState } from "react";
import type { Meta, StoryObj } from "@storybook/react-vite";
import { SectionHeader } from "@shared/components/SectionHeader";
const meta: Meta<typeof SectionHeader> = {
title: "Primitives/SectionHeader",
component: SectionHeader,
tags: ["autodocs"],
parameters: { layout: "padded" },
decorators: [
(S) => (
<div style={{ maxWidth: "20rem" }}>
<S />
</div>
),
],
};
export default meta;
type Story = StoryObj<typeof SectionHeader>;
export const Static: Story = { args: { title: "Policies", count: "3 active" } };
export const Collapsible: Story = {
render: () => {
const [open, setOpen] = useState(true);
return (
<SectionHeader
title="Policies"
count="3 active"
collapsible
expanded={open}
onToggle={() => setOpen((v) => !v)}
/>
);
},
};