import { action } from "@storybook/addon-actions" import { storiesOf } from "@storybook/react-native" import { Wrap } from "app/utils/Wrap" import { BellIcon, Box, Flex, LinkIcon, Spacer } from "palette" import { useState } from "react" import { Button as RNButton } from "react-native" import { withHooks, withScreenDimensions, withTheme } from "storybook/decorators" import { DataList, List } from "storybook/helpers" import { Button, ButtonProps, CTAButton, FollowButton, LinkButton } from "." import { _test_DisplayState } from "./Button" const sizes: Array = ["small", "large"] const variants: Array = [ "fillDark", "fillLight", "fillGray", "fillSuccess", "outline", "outlineGray", "outlineLight", "text", ] const states: Array<_test_DisplayState | undefined> = [ undefined, _test_DisplayState.Enabled, _test_DisplayState.Disabled, _test_DisplayState.Loading, _test_DisplayState.Pressed, ] storiesOf("Button", module) .addDecorator(withTheme) .addDecorator(withScreenDimensions) .addDecorator(withHooks) .add("Sizes", () => ( ( )} /> )) .add("States", () => ( ( )} /> )) .add("Call To Action Button (CTA Button)", () => ( console.log("pressed")}>cta button )) .add("LinkButton", () => ( console.log("pressed")}>LinkButton )) .add("Variants", () => ( ( )} /> )) .add("Variants (loading)", () => ( ( )} /> )) .add("Variants (disabled)", () => ( ( )} /> )) .add("Miscellaneous", () => ( )) .add("Playground", () => { const [loading, setLoading] = useState(false) const [disabled, setDisabled] = useState(true) const [block, setBlock] = useState(false) return ( <> setLoading((v) => !v)} /> setDisabled((v) => !v)} /> setBlock((v) => !v)} /> ) }) .add("FollowButton", () => { const [follow, setFollow] = useState(true) return ( setFollow((v) => !v)} /> ) })