Skip to content

Commit d8c669a

Browse files
committed
Add storybook
1 parent d58a465 commit d8c669a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

site/src/components/VersionsTable/VersionsTable.stories.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { action } from "@storybook/addon-actions"
12
import { ComponentMeta, Story } from "@storybook/react"
23
import { MockTemplateVersion } from "../../testHelpers/entities"
34
import { VersionsTable, VersionsTableProps } from "./VersionsTable"
@@ -13,13 +14,30 @@ const Template: Story<VersionsTableProps> = (args) => (
1314

1415
export const Example = Template.bind({})
1516
Example.args = {
17+
activeVersionId: MockTemplateVersion.id,
1618
versions: [
19+
{
20+
...MockTemplateVersion,
21+
id: "2",
22+
name: "test-template-version-2",
23+
created_at: "2022-05-18T18:39:01.382927298Z",
24+
},
1725
MockTemplateVersion,
26+
],
27+
}
28+
29+
export const CanPromote = Template.bind({})
30+
CanPromote.args = {
31+
activeVersionId: MockTemplateVersion.id,
32+
onPromoteClick: action("onPromoteClick"),
33+
versions: [
1834
{
1935
...MockTemplateVersion,
36+
id: "2",
2037
name: "test-template-version-2",
2138
created_at: "2022-05-18T18:39:01.382927298Z",
2239
},
40+
MockTemplateVersion,
2341
],
2442
}
2543

0 commit comments

Comments
 (0)