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:
25
pkgs/clan-app/ui/.storybook/preview.ts
Normal file
25
pkgs/clan-app/ui/.storybook/preview.ts
Normal 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;
|
||||
Reference in New Issue
Block a user