Files
helm-dashboard/frontend/src/components/Button.stories.tsx
Andrey Pokhilko dd7aca70ff Rename frontend directory (#472)
* Rename directory

* Cleanup

* Recover lost images

* remove lint
2023-09-26 10:04:44 +01:00

36 lines
1.0 KiB
TypeScript

/* eslint-disable no-console */
// Status.stories.ts|tsx
import { ComponentStory, ComponentMeta } from "@storybook/react";
import Button, { ButtonProps } from "./Button";
//👇 This default export determines where your story goes in the story list
export default {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: "Button",
component: Button,
} as ComponentMeta<typeof Button>;
// Recall that Button has 'props' which is of type ButtonProps
// We want to past theme to the story with the name 'Default', so we
// create a template for it.
// We want to declare default values for the props, so we create a
// default args object.
const Template: ComponentStory<typeof Button> = (args: ButtonProps) => (
<Button {...args} />
);
export const Default = Template.bind({});
Default.args = {
children: (
<>
<span>&uarr;</span>
<span>Update</span>
</>
),
onClick: () => {
console.log("click");
},
};