Files
coder/site/src/components/Button/LoadingButton.stories.tsx
T
Bryan d8e530e1ec refactor: Add 'src' folder in 'site' (#445)
This refactoring re-organizes the `site` folder to have a nested `src` folder.

Originally, [we wanted to keep the directory structure shallow](https://github.com/coder/coder/pull/8#issuecomment-1009578910) - but there were two points that motivated this change to introduce the `src` level.

1. We have several non-`src` folders now (`e2e`, `static`, `html_templates`, `.storybook`)
2. Having a `src` folder makes it easier to run XState Typegen

So given those two data points - I believe it makes sense to revisit that and introduce a `src` folder.
2022-03-16 04:06:03 +00:00

27 lines
645 B
TypeScript

import { Story } from "@storybook/react"
import React from "react"
import { LoadingButton, LoadingButtonProps } from "./LoadingButton"
export default {
title: "Button/LoadingButton",
component: LoadingButton,
argTypes: {
loading: { control: { type: "boolean" } },
children: { control: "text", defaultValue: "Create workspace" },
},
}
const Template: Story<LoadingButtonProps> = (args) => <LoadingButton {...args} />
export const Loading = Template.bind({})
Loading.args = {
variant: "contained",
loading: true,
}
export const NotLoading = Template.bind({})
NotLoading.args = {
variant: "contained",
loading: false,
}