1
- import { ComponentMeta , Story } from "@storybook/react" ;
2
- import { DeploymentOption } from "api/types" ;
3
- import {
4
- SecuritySettingsPageView ,
5
- SecuritySettingsPageViewProps ,
6
- } from "./SecuritySettingsPageView" ;
1
+ import { DeploymentGroup , DeploymentOption } from "api/types" ;
2
+ import { SecuritySettingsPageView } from "./SecuritySettingsPageView" ;
3
+ import type { Meta , StoryObj } from "@storybook/react" ;
7
4
8
- export default {
5
+ const group : DeploymentGroup = {
6
+ name : "Networking" ,
7
+ description : "" ,
8
+ children : [ ] as DeploymentGroup [ ] ,
9
+ } ;
10
+
11
+ const meta : Meta < typeof SecuritySettingsPageView > = {
9
12
title : "pages/SecuritySettingsPageView" ,
10
13
component : SecuritySettingsPageView ,
11
14
args : {
@@ -14,50 +17,62 @@ export default {
14
17
name : "SSH Keygen Algorithm" ,
15
18
description : "something" ,
16
19
value : "1234" ,
20
+ group,
21
+ flag : "derp" ,
22
+ flag_shorthand : "d" ,
23
+ hidden : false ,
17
24
} ,
18
25
{
19
26
name : "Secure Auth Cookie" ,
20
27
description : "something" ,
21
28
value : "1234" ,
29
+ flag : "derp" ,
30
+ flag_shorthand : "d" ,
31
+ hidden : false ,
22
32
} ,
23
33
{
24
34
name : "Disable Owner Workspace Access" ,
25
35
description : "something" ,
26
36
value : false ,
37
+ flag : "derp" ,
38
+ flag_shorthand : "d" ,
39
+ hidden : false ,
27
40
} ,
28
41
{
29
42
name : "TLS Version" ,
30
43
description : "something" ,
31
44
value : [ "something" ] ,
32
- group : {
33
- name : "TLS" ,
34
- } ,
45
+ group : { ...group , name : "TLS" } ,
46
+ flag : "derp" ,
47
+ flag_shorthand : "d" ,
48
+ hidden : false ,
35
49
} ,
36
50
] ,
37
51
featureAuditLogEnabled : true ,
38
52
featureBrowserOnlyEnabled : true ,
39
53
} ,
40
- } as ComponentMeta < typeof SecuritySettingsPageView > ;
54
+ } ;
41
55
42
- const Template : Story < SecuritySettingsPageViewProps > = ( args ) => (
43
- < SecuritySettingsPageView { ...args } />
44
- ) ;
45
- export const Page = Template . bind ( { } ) ;
56
+ export default meta ;
57
+ type Story = StoryObj < typeof SecuritySettingsPageView > ;
46
58
47
- export const NoTLS = Template . bind ( { } ) ;
48
- NoTLS . args = {
49
- options : [
50
- {
51
- name : "SSH Keygen Algorithm" ,
52
- value : "1234" ,
53
- } as DeploymentOption ,
54
- {
55
- name : "Disable Owner Workspace Access" ,
56
- value : false ,
57
- } as DeploymentOption ,
58
- {
59
- name : "Secure Auth Cookie" ,
60
- value : "1234" ,
61
- } as DeploymentOption ,
62
- ] ,
59
+ export const Page : Story = { } ;
60
+
61
+ export const NoTLS = {
62
+ args : {
63
+ options : [
64
+ {
65
+ name : "SSH Keygen Algorithm" ,
66
+ value : "1234" ,
67
+ } as DeploymentOption ,
68
+ {
69
+ name : "Disable Owner Workspace Access" ,
70
+ value : false ,
71
+ } as DeploymentOption ,
72
+ {
73
+ name : "Secure Auth Cookie" ,
74
+ value : "1234" ,
75
+ } as DeploymentOption ,
76
+ ] ,
77
+ } ,
63
78
} ;
0 commit comments