UNPKG

@violetprotocol/nudge-components

Version:

Components for Nudge's websites and applications.

51 lines (50 loc) 1.35 kB
import { jsx as _jsx } from "react/jsx-runtime"; import { Button } from "./Button"; import { ButtonVariant } from "./types"; import { Icon } from "../Icon/Icon"; const meta = { component: Button, args: { children: "Nudge me", }, }; export default meta; const argTypes = { variant: { options: [ ButtonVariant.DEFAULT, ButtonVariant.FORWARD_CIRCLED_ARROW, ButtonVariant.BACK_ARROW, ], control: { type: "select" }, }, loading: { control: { type: "boolean" }, }, spinnerColor: { control: { type: "color" }, }, }; export const Primary = { render: (args) => _jsx(Button, { ...args }), argTypes, }; export const ForwardCircledArrow = { render: (args) => _jsx(Button, { ...args }), argTypes, args: { variant: ButtonVariant.FORWARD_CIRCLED_ARROW }, }; export const BackArrow = { render: (args) => _jsx(Button, { ...args }), argTypes, args: { variant: ButtonVariant.BACK_ARROW, children: "Back", className: "bg-[#31323e] text-neutral-300", }, }; export const AsCircle = { render: () => (_jsx(Button, { variant: ButtonVariant.CIRCLE, children: _jsx(Icon, { name: "menu", width: 16, height: 16 }) })), argTypes, args: { variant: ButtonVariant.FORWARD_CIRCLED_ARROW }, };