Web: Common: created floating button stories

This commit is contained in:
Viktor Fomin 2020-11-16 14:48:10 +03:00
parent a940797f7c
commit a36bd324cb

View File

@ -0,0 +1,25 @@
import React from "react";
import { storiesOf } from "@storybook/react";
import { withKnobs, select, boolean } from "@storybook/addon-knobs/react";
import Section from "../../../.storybook/decorators/section";
import withReadme from "storybook-readme/with-readme";
import Readme from "./README.md";
import FloatingButton from "./index";
import { bool } from "prop-types";
storiesOf("Components|Floating Button", module)
.addDecorator(withKnobs)
.addDecorator(withReadme(Readme))
.add("floating button", () => {
const iconVariables = ["upload", "file", "trash", "move", "duplicate"];
return (
<Section>
<h1>Floating button</h1>
<FloatingButton
icon={select("icon", iconVariables, "upload")}
alert={boolean("alert", false)}
/>
</Section>
);
});