Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c133cc3

Browse files
committed
Add storybook
1 parent c144866 commit c133cc3

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import { Story } from "@storybook/react"
2+
import {
3+
makeMockApiError,
4+
MockOrganization,
5+
MockTemplateExample,
6+
MockTemplateExample2,
7+
} from "testHelpers/entities"
8+
import {
9+
StarterTemplatesPageView,
10+
StarterTemplatesPageViewProps,
11+
} from "./StarterTemplatesPageView"
12+
13+
export default {
14+
title: "pages/StarterTemplatesPageView",
15+
component: StarterTemplatesPageView,
16+
}
17+
18+
const Template: Story<StarterTemplatesPageViewProps> = (args) => (
19+
<StarterTemplatesPageView {...args} />
20+
)
21+
22+
export const Default = Template.bind({})
23+
Default.args = {
24+
context: {
25+
organizationId: MockOrganization.id,
26+
error: undefined,
27+
starterTemplates: [MockTemplateExample, MockTemplateExample2],
28+
},
29+
}
30+
31+
export const Error = Template.bind({})
32+
Error.args = {
33+
context: {
34+
organizationId: MockOrganization.id,
35+
error: makeMockApiError({
36+
message: "Error on loading the template examples",
37+
}),
38+
starterTemplates: undefined,
39+
},
40+
}

0 commit comments

Comments
 (0)