Add Button design system and Storybook Solid setup
Some checks failed
CI TEST (Vault secrets) / build (push) Failing after 15s
Some checks failed
CI TEST (Vault secrets) / build (push) Failing after 15s
This commit is contained in:
44
.storybook/preview.tsx
Normal file
44
.storybook/preview.tsx
Normal file
@@ -0,0 +1,44 @@
|
||||
import type { Preview } from "storybook-solidjs-vite";
|
||||
import "../src/app/styles/global.css";
|
||||
|
||||
const preview: Preview = {
|
||||
globalTypes: {
|
||||
theme: {
|
||||
name: "Theme",
|
||||
description: "Global theme for components",
|
||||
defaultValue: "light",
|
||||
toolbar: {
|
||||
icon: "mirror",
|
||||
items: [
|
||||
{ value: "light", title: "Light" },
|
||||
{ value: "dark", title: "Dark" },
|
||||
],
|
||||
dynamicTitle: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
decorators: [
|
||||
(Story, context) => {
|
||||
document.documentElement.dataset.theme = context.globals.theme ?? "light";
|
||||
|
||||
return (
|
||||
<div style={{ padding: "16px" }}>
|
||||
<Story />
|
||||
</div>
|
||||
);
|
||||
},
|
||||
],
|
||||
parameters: {
|
||||
controls: {
|
||||
matchers: {
|
||||
color: /(background|color)$/i,
|
||||
date: /Date$/i,
|
||||
},
|
||||
},
|
||||
a11y: {
|
||||
test: "todo",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default preview;
|
||||
Reference in New Issue
Block a user