File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
site/src/components/VersionsTable Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { action } from "@storybook/addon-actions"
1
2
import { ComponentMeta , Story } from "@storybook/react"
2
3
import { MockTemplateVersion } from "../../testHelpers/entities"
3
4
import { VersionsTable , VersionsTableProps } from "./VersionsTable"
@@ -13,13 +14,30 @@ const Template: Story<VersionsTableProps> = (args) => (
13
14
14
15
export const Example = Template . bind ( { } )
15
16
Example . args = {
17
+ activeVersionId : MockTemplateVersion . id ,
16
18
versions : [
19
+ {
20
+ ...MockTemplateVersion ,
21
+ id : "2" ,
22
+ name : "test-template-version-2" ,
23
+ created_at : "2022-05-18T18:39:01.382927298Z" ,
24
+ } ,
17
25
MockTemplateVersion ,
26
+ ] ,
27
+ }
28
+
29
+ export const CanPromote = Template . bind ( { } )
30
+ CanPromote . args = {
31
+ activeVersionId : MockTemplateVersion . id ,
32
+ onPromoteClick : action ( "onPromoteClick" ) ,
33
+ versions : [
18
34
{
19
35
...MockTemplateVersion ,
36
+ id : "2" ,
20
37
name : "test-template-version-2" ,
21
38
created_at : "2022-05-18T18:39:01.382927298Z" ,
22
39
} ,
40
+ MockTemplateVersion ,
23
41
] ,
24
42
}
25
43
You can’t perform that action at this time.
0 commit comments