Files
medusa-store/packages/medusa-react/.storybook/preview.js
T
Frane PolićandfPolic daf49bcaf3 feat: customer groups react hooks (#1153)
* fix: msw handlers for medusa-react storybook

* feat: add customer groups query hooks

* feat: add create/update customer groups hooks

* feat: add customer group batch  hooks

* feat: add test files, fix import

* add customer groups fixture

* add customer gorup mock endpoints

* add test cases

* add hook comments

* fix: typos

* fix: comments refactor

* fix: comment

Co-authored-by: fPolic <frane@medusajs.com>
2022-03-07 12:52:48 +01:00

25 lines
669 B
JavaScript

import React from "react"
import DefaultMedusaProvider from "./medusa-context"
import { initialize, mswDecorator } from "msw-storybook-addon"
import { adminHandlers, storeHandlers } from "../mocks/handlers"
initialize()
// https://storybook.js.org/docs/react/writing-stories/parameters#global-parameters
export const parameters = {
// https://storybook.js.org/docs/react/essentials/actions#automatically-matching-args
actions: { argTypesRegex: "^on.*" },
msw: {
handlers: [...adminHandlers, ...storeHandlers],
},
}
export const decorators = [
mswDecorator,
(Story) => (
<DefaultMedusaProvider>
<Story />
</DefaultMedusaProvider>
),
]