import type { Meta, StoryObj } from "@storybook/react-vite"; import { useState } from "react"; import { ChatFABWindow } from "@shared/components/ChatFABWindow"; const DEMO_MESSAGES = [ { id: 1, role: "user" as const, text: "Merge the three contracts and redact all SSNs", }, { id: 2, role: "assistant" as const, text: "I'll merge the PDFs first, then run redaction on the combined document. Starting now…", }, { id: 3, role: "user" as const, text: "Great, also add a watermark" }, ]; function MockChat() { return (
Stirling
{DEMO_MESSAGES.map((m) => (
{m.text}
))}
What do you want to do?
); } const meta: Meta = { title: "Editor/ChatFAB/ChatFABWindow", component: ChatFABWindow, parameters: { layout: "centered" }, decorators: [ (S) => (
), ], argTypes: { open: { control: "boolean" }, }, }; export default meta; type Story = StoryObj; export const Closed: Story = { args: { open: false, children: }, }; export const Open: Story = { args: { open: true, children: }, }; export const Toggle: Story = { render: () => { const [open, setOpen] = useState(false); return (
); }, };