17450b4531
by fixing the cause rather than the symptom: this upgrades the code to use the new, recommended JSX transform mode of React 17+, which no longer requires you to import React manually just to write JSX.
24 lines
602 B
JavaScript
24 lines
602 B
JavaScript
import { addDecorator } from "@storybook/react";
|
|
import { MemoryRouter } from "react-router-dom";
|
|
import { usePageFocusStyle } from "../src/usePageFocusStyle";
|
|
import { OverlayProvider } from "@react-aria/overlays";
|
|
import "../src/index.css";
|
|
|
|
export const parameters = {
|
|
actions: { argTypesRegex: "^on[A-Z].*" },
|
|
controls: {
|
|
matchers: {
|
|
color: /(background|color)$/i,
|
|
date: /Date$/,
|
|
},
|
|
},
|
|
};
|
|
|
|
addDecorator((story) => {
|
|
usePageFocusStyle();
|
|
return (
|
|
<MemoryRouter initialEntries={["/"]}>
|
|
<OverlayProvider>{story()}</OverlayProvider>
|
|
</MemoryRouter>
|
|
);
|
|
});
|