feat: add storybook and new badge component with stories

This commit is contained in:
Scott Wilson
2025-10-23 09:30:30 -07:00
parent 1bf55017a1
commit 6d95985eec
19 changed files with 2437 additions and 168 deletions
+45
View File
@@ -0,0 +1,45 @@
import type { Preview } from "@storybook/react-vite";
import { RouterDecorator } from "./decorators";
import "../src/index.css";
const preview: Preview = {
decorators: [
(Story) => {
const root = document.getElementsByTagName("html")[0];
root.setAttribute("class", "overflow-visible");
return <Story />;
},
RouterDecorator
],
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
},
docs: {
backgroundColor: "var(--background)"
},
a11y: {
test: "todo"
},
backgrounds: {
default: "dark",
options: {
dark: { name: "Dark", value: "var(--background)" }
}
}
},
initialGlobals: {
backgrounds: {
value: "dark"
}
}
};
export default preview;