2020-10-16 13:16:01 +00:00
|
|
|
import React from "react";
|
|
|
|
import { storiesOf } from "@storybook/react";
|
|
|
|
import { withKnobs, boolean, text } from "@storybook/addon-knobs/react";
|
|
|
|
import withReadme from "storybook-readme/with-readme";
|
|
|
|
import Readme from "./README.md";
|
|
|
|
import GroupButton from ".";
|
|
|
|
import DropDownItem from "../drop-down-item";
|
2019-06-06 07:12:28 +00:00
|
|
|
|
2020-10-16 13:16:01 +00:00
|
|
|
storiesOf("Components|GroupButton", module)
|
|
|
|
.addDecorator(withKnobs)
|
|
|
|
.addDecorator(withReadme(Readme))
|
|
|
|
.add("base", () => (
|
|
|
|
<GroupButton
|
|
|
|
label={text("Label", "Base group button")}
|
|
|
|
disabled={boolean("disabled", false)}
|
|
|
|
isDropdown={boolean("isDropdown", false)}
|
|
|
|
opened={boolean("opened", false)}
|
|
|
|
>
|
|
|
|
<DropDownItem label="Action 1" />
|
|
|
|
<DropDownItem label="Action 2" />
|
|
|
|
<DropDownItem label="Action 3" />
|
|
|
|
</GroupButton>
|
|
|
|
));
|