react-snackbar-ui-customizable
Version:
snackbar component for react without style
29 lines (24 loc) • 578 B
JavaScript
import { addDecorator } from "@storybook/react";
import { SnackbarContextProvider } from "../src/context/snackbarContext";
import GlobalStyle from "../src/styles/globalStyle";
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
};
const ChildApp = ({ storyFn }) => {
return <>{storyFn()}</>;
};
const AppDecorator = (storyFn) => {
return (
<>
<GlobalStyle />
<ChildApp storyFn={storyFn} />
</>
);
};
addDecorator(AppDecorator);