// src/components/Button.stories.jsx
import React from 'react';
import Button from './Button';
export default {
title: 'Components/Button',
component: Button,
};
const Template = (args) => <Button {...args} />;
export const Primary = Template.bind({});
Primary.args = {
primary: true,
label: 'Primary Button',
};
export const Secondary = Template.bind({});
Secondary.args = {
primary: false,
label: 'Secondary Button',
};
export const WithClickHandler = Template.bind({});
WithClickHandler.args = {
primary: true,
label: 'Click Me',
onClick: () => alert('Button clicked!'),
};
This story file defines three variants of the Button component: a primary button, a secondary button, and a button with a click handler.