mirror of
https://github.com/coder/coder.git
synced 2026-11-16 02:20:33 +08:00
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.
27 lines
645 B
TypeScript
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,
|
|
}
|