Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update vite, storybook, apache-arrow dependencies, update stories #3587

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions frontend/.storybook/main.cjs

This file was deleted.

18 changes: 18 additions & 0 deletions frontend/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { StorybookConfig } from "@storybook/react-vite";

const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
],
framework: {
name: "@storybook/react-vite",
options: {},
},
core: {
disableTelemetry: true,
},
};
export default config;
5 changes: 5 additions & 0 deletions frontend/.storybook/manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { addons } from "@storybook/manager-api";

addons.setConfig({
panelPosition: "right",
});
36 changes: 20 additions & 16 deletions frontend/.storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ThemeProvider } from "@emotion/react";
import type { Preview } from "@storybook/react";

import { theme } from "../src/app-theme";
import GlobalStyles from "../src/js/GlobalStyles";
Expand All @@ -9,23 +10,26 @@ import translationsDe from "../src/localization/de.json";
i18next.addResourceBundle("de", "translation", translationsDe, true, true);
i18next.changeLanguage("de");

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
const Decorator = (Story: any) => (
<ThemeProvider theme={theme}>
<DndProvider>
<GlobalStyles />
<Story />
</DndProvider>
</ThemeProvider>
);

const preview: Preview = {
decorators: [Decorator],
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export const decorators = [
(Story) => (
<ThemeProvider theme={theme}>
<DndProvider>
<GlobalStyles />
<Story />
</DndProvider>
</ThemeProvider>
),
];
export default preview;
Loading
Loading