Skip to content

Commit

Permalink
[New #209] React and React DOM upgraded to v18. Other dependencies (s…
Browse files Browse the repository at this point in the history
…torybook, react component libs, testing libs,...) synchronised. Work in progress. Library for global storybook controls has React 18 as optional peer dependency, need to examine closer.
  • Loading branch information
VojtechLunak committed Jun 26, 2023
1 parent 86a275f commit 8fa8873
Show file tree
Hide file tree
Showing 7 changed files with 20,869 additions and 40,581 deletions.
5 changes: 4 additions & 1 deletion .storybook/main.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ module.exports = {
"@luigiminardim/storybook-addon-globals-controls",
"@storybook/addon-a11y",
],
framework: "@storybook/react",
framework: "@storybook/react-webpack5",
core: {
builder: "@storybook/builder-webpack5",
},
};
23 changes: 13 additions & 10 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Constants from "../src/constants/Constants";
import { addDecorator } from "@storybook/react";
import IntlContextProvider from "../src/contexts/IntlContextProvider";
import { FormGenContextProvider } from "../src/contexts/FormGenContext";
import { ConfigurationContextProvider } from "../src/contexts/ConfigurationContext";
Expand Down Expand Up @@ -104,12 +103,16 @@ const fetchTypeAheadValues = () => {
);
};

addDecorator((story) => (
<ConfigurationContextProvider options={options}>
<FormGenContextProvider fetchTypeAheadValues={fetchTypeAheadValues}>
<IntlContextProvider locale={globalTypes.locale.defaultValue}>
{story()}
</IntlContextProvider>
</FormGenContextProvider>
</ConfigurationContextProvider>
));
export const preview = {
decorators: [
(Story) => (
<ConfigurationContextProvider options={options}>
<FormGenContextProvider fetchTypeAheadValues={fetchTypeAheadValues}>
<IntlContextProvider locale={globalTypes.locale.defaultValue}>
<Story />
</IntlContextProvider>
</FormGenContextProvider>
</ConfigurationContextProvider>
),
],
};
Loading

0 comments on commit 8fa8873

Please sign in to comment.