Skip to content

Commit

Permalink
feat(storybook): add sitelaunchpad to storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
kishore03109 committed Jun 15, 2023
1 parent c97defc commit 4bb65a1
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions src/layouts/SiteLaunchPad/SiteLaunchPad.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { ComponentMeta, Story } from "@storybook/react"
import { MemoryRouter, Route } from "react-router-dom"

import { SiteLaunchProvider } from "contexts/SiteLaunchContext"

import { buildSiteLaunchDto } from "mocks/utils"

import { SiteLaunchPad } from "./SiteLaunchPad"

const SiteLaunchPadMeta = {
title: "Pages/SiteLaunchPad",
component: SiteLaunchPad,
parameters: {
msw: {
handlers: {
siteLaunchStatusProps: buildSiteLaunchDto({
siteStatus: "NOT_LAUNCHED",
}),
},
},
},
decorators: [
(StoryFn) => {
return (
<MemoryRouter initialEntries={["/sites/storybook/siteLaunchPad"]}>
<Route path="/sites/:siteName/siteLaunchPad">
<SiteLaunchProvider>
<StoryFn />
</SiteLaunchProvider>
</Route>
</MemoryRouter>
)
},
],
} as ComponentMeta<typeof SiteLaunchPad>

const Template = SiteLaunchPad
export const Default: Story = Template.bind({})
export default SiteLaunchPadMeta

0 comments on commit 4bb65a1

Please sign in to comment.