2020-11-06 12:39:31 +00:00
|
|
|
import React from "react";
|
|
|
|
import { storiesOf } from "@storybook/react";
|
|
|
|
import {
|
|
|
|
withKnobs,
|
2020-11-09 13:02:08 +00:00
|
|
|
text,
|
2020-11-06 12:39:31 +00:00
|
|
|
boolean,
|
|
|
|
color,
|
|
|
|
number,
|
|
|
|
} from "@storybook/addon-knobs/react";
|
|
|
|
import Section from "../../../../.storybook/decorators/section";
|
|
|
|
|
|
|
|
import Loaders from "..";
|
2021-02-25 21:19:45 +00:00
|
|
|
import { LoaderStyle } from "../../../constants";
|
2020-11-09 11:45:57 +00:00
|
|
|
import withReadme from "storybook-readme/with-readme";
|
|
|
|
import Readme from "./README.md";
|
2020-11-06 12:39:31 +00:00
|
|
|
|
|
|
|
storiesOf("Components|Loaders", module)
|
|
|
|
.addDecorator(withKnobs)
|
2020-11-09 11:45:57 +00:00
|
|
|
.addDecorator(withReadme(Readme))
|
2020-11-06 12:39:31 +00:00
|
|
|
.add("tree folder loader", () => (
|
|
|
|
<Section>
|
|
|
|
<h1>Tree Folder Loader</h1>
|
|
|
|
<Loaders.TreeFolders
|
2020-11-09 13:02:08 +00:00
|
|
|
title={text("title", LoaderStyle.title)}
|
2020-11-11 08:38:30 +00:00
|
|
|
borderRadius={text("borderRadius", "3")}
|
2020-11-06 12:39:31 +00:00
|
|
|
backgroundColor={color("backgroundColor", LoaderStyle.backgroundColor)}
|
|
|
|
foregroundColor={color("foregroundColor", LoaderStyle.foregroundColor)}
|
|
|
|
backgroundOpacity={number(
|
|
|
|
"backgroundOpacity",
|
|
|
|
LoaderStyle.backgroundOpacity
|
|
|
|
)}
|
|
|
|
foregroundOpacity={number(
|
|
|
|
"foregroundOpacity",
|
|
|
|
LoaderStyle.foregroundOpacity
|
|
|
|
)}
|
|
|
|
speed={number("speed", LoaderStyle.speed)}
|
|
|
|
animate={boolean("animate", LoaderStyle.animate)}
|
|
|
|
/>
|
|
|
|
</Section>
|
|
|
|
));
|