1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00
Files
browser/.storybook/preview.tsx
Bryan Cunningham a8fb456329 Uif/remove a11y manual flag (#14744)
* remove comment left in error

* remove runOnly options and manual flag
2025-05-12 14:38:08 -04:00

53 lines
1.2 KiB
TypeScript

import { setCompodocJson } from "@storybook/addon-docs/angular";
import { withThemeByClassName } from "@storybook/addon-themes";
import { componentWrapperDecorator } from "@storybook/angular";
import type { Preview } from "@storybook/angular";
import docJson from "../documentation.json";
setCompodocJson(docJson);
const wrapperDecorator = componentWrapperDecorator((story) => {
return /*html*/ `
<div class="tw-bg-background tw-px-5 tw-py-10">
${story}
</div>
`;
});
const preview: Preview = {
decorators: [
withThemeByClassName({
themes: {
light: "theme_light",
dark: "theme_dark",
},
defaultTheme: "light",
}),
wrapperDecorator,
],
parameters: {
a11y: {
element: "#storybook-root",
},
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
options: {
storySort: {
method: "alphabetical",
order: ["Documentation", ["Introduction", "Colors", "Icons"], "Component Library"],
},
},
docs: { source: { type: "dynamic", excludeDecorators: true } },
backgrounds: {
disable: true,
},
},
tags: ["autodocs"],
};
export default preview;