File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
site/src/pages/StarterTemplatesPage Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments