Skip to content

Commit a07a5c4

Browse files
committed
Move stories to dropdown button
1 parent e431721 commit a07a5c4

File tree

2 files changed

+30
-19
lines changed

2 files changed

+30
-19
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { action } from "@storybook/addon-actions"
2+
import { Story } from "@storybook/react"
3+
import { WorkspaceStateEnum } from "util/workspace"
4+
import { DeleteButton, UpdateButton, StartButton, DisabledButton } from "./ActionCtas"
5+
import { DropdownButton, DropdownButtonProps } from "./DropdownButton"
6+
7+
export default {
8+
title: "Components/DropdownButton",
9+
component: DropdownButton,
10+
}
11+
12+
const Template: Story<DropdownButtonProps> = (args) => <DropdownButton {...args} />
13+
14+
export const WithDropdown = Template.bind({})
15+
WithDropdown.args = {
16+
primaryAction: <StartButton handleAction={action("start")} />,
17+
secondaryActions: [
18+
{ action: "update", button: <UpdateButton handleAction={action("update")} /> },
19+
{ action: "delete", button: <DeleteButton handleAction={action("delete")} /> }
20+
],
21+
canCancel: false
22+
}
23+
24+
export const WithCancel = Template.bind({})
25+
WithCancel.args = {
26+
primaryAction: <DisabledButton workspaceState={WorkspaceStateEnum.deleting} />,
27+
secondaryActions: [],
28+
canCancel: true,
29+
handleCancel: action("cancel")
30+
}

site/src/components/DropdownButton/DropdownContent/DropdownContent.stories.tsx

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)