diff --git a/packages/propel/.storybook/main.ts b/packages/propel/.storybook/main.ts index 49dd3b4b..5163d9d3 100644 --- a/packages/propel/.storybook/main.ts +++ b/packages/propel/.storybook/main.ts @@ -1,5 +1,5 @@ -import tailwindcss from "@tailwindcss/vite"; import type { StorybookConfig } from "@storybook/react-vite"; +import tailwindcss from "@tailwindcss/vite"; const config: StorybookConfig = { framework: "@storybook/react-vite", diff --git a/packages/propel/.storybook/preview.css b/packages/propel/.storybook/preview.css index 66c6f1f8..bc4cabd7 100644 --- a/packages/propel/.storybook/preview.css +++ b/packages/propel/.storybook/preview.css @@ -1,8 +1,7 @@ -/* Storybook's Tailwind entry: pull in Tailwind, then propel's tokens + styles. - propel.css's `@source "../"` makes Tailwind scan src/ (components + stories), - so the utility classes propel uses are generated for the preview. */ -@import "tailwindcss"; -@import "../src/styles/propel.css"; +/* Storybook's Tailwind entry: the shared tooling entry (Tailwind + propel's tokens). + propel.css's `@source "../"` makes Tailwind scan src/ (components + stories), so + the utility classes propel uses are generated for the preview. */ +@import "../tailwind.css"; /* Make the preview canvas adapt to the active theme so the toolbar toggle is visually meaningful (bg + text follow light/dark/contrast). */ diff --git a/packages/propel/.storybook/preview.tsx b/packages/propel/.storybook/preview.tsx index bcc60225..92d1d769 100644 --- a/packages/propel/.storybook/preview.tsx +++ b/packages/propel/.storybook/preview.tsx @@ -1,6 +1,7 @@ import { DirectionProvider } from "@base-ui/react/direction-provider"; import type { Decorator, Preview } from "@storybook/react-vite"; import { useLayoutEffect } from "react"; + import "./preview.css"; import { type Theme, THEMES } from "./themes"; diff --git a/packages/propel/src/components/accordion/accordion.stories.tsx b/packages/propel/src/components/accordion/accordion.stories.tsx index 5eff34da..00a6411a 100644 --- a/packages/propel/src/components/accordion/accordion.stories.tsx +++ b/packages/propel/src/components/accordion/accordion.stories.tsx @@ -1,6 +1,7 @@ import type { Meta, StoryObj } from "@storybook/react-vite"; import { CircleHelp } from "lucide-react"; import { expect } from "storybook/test"; + import { Accordion, AccordionItem, AccordionPanel, AccordionTrigger } from "./index"; // Design-review convention — when to add a pseudo-states "States" story: @@ -87,16 +88,16 @@ export const WithIcon: Story = { }; /** - * The trigger's interaction states side by side. The accordion trigger styles - * interaction purely with CSS utilities (`hover:bg-layer-transparent-hover` and - * `focus-visible:ring-2 focus-visible:ring-accent-strong`), so - * storybook-addon-pseudo-states can force them statically — no real pointer/keyboard. + * The trigger's interaction states side by side. The accordion trigger styles interaction purely + * with CSS utilities (`hover:bg-layer-transparent-hover` and `focus-visible:ring-2 + * focus-visible:ring-accent-strong`), so storybook-addon-pseudo-states can force them statically — + * no real pointer/keyboard. * - * One accordion with a row per state: each trigger `