mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-14 18:44:05 +02:00
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]>
37 lines
884 B
TypeScript
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)}
|
|
/>
|
|
);
|
|
},
|
|
};
|