feat(ui): introduces storybook

- adds the necessary dependencies and configuration for Storybook.
- refactors the `Button` component and adds some stories for it.
This commit is contained in:
Brian McGee
2025-05-26 12:26:38 +01:00
parent 784e90096b
commit 717f78b29c
35 changed files with 6805 additions and 56 deletions

View File

@@ -0,0 +1,25 @@
import type { Preview } from "@kachurun/storybook-solid";
export const preview: Preview = {
tags: ["autodocs"],
parameters: {
docs: { toc: true },
backgrounds: {
values: [
{ name: "Dark", value: "#333" },
{ name: "Light", value: "#F7F9F2" },
],
default: "Light",
},
// automatically create action args for all props that start with "on"
actions: { argTypesRegex: "^on.*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
},
};
export default preview;