mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-27 00:48:06 +08:00
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.
25 lines
602 B
JavaScript
25 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>
|
|
);
|
|
});
|