Skip to content

Commit

Permalink
Merge pull request #3587 from ingef/update-vite-and-storybook
Browse files Browse the repository at this point in the history
Update vite, storybook, apache-arrow dependencies, update stories
  • Loading branch information
Kadrian authored Oct 2, 2024
2 parents 81e7db2 + 247355c commit f58dd0e
Show file tree
Hide file tree
Showing 13 changed files with 3,178 additions and 6,667 deletions.
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

0 comments on commit f58dd0e

Please sign in to comment.