Skip to content

Commit

Permalink
feat: update Button stories to CSF3
Browse files Browse the repository at this point in the history
  • Loading branch information
mohitb35 committed Jan 11, 2024
1 parent 2eccc89 commit 6b2a3fb
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/features/user/BulkCodes/stories/Button.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
import React from 'react';
import { StoryFn, Meta } from '@storybook/react';

import type { Meta, StoryObj } from '@storybook/react';
import { Button } from '@mui/material';
// As this is a MUI component, there is no corresponding Button.tsx component file

export default {
const meta: Meta<typeof Button> = {
title: 'Components/Button',
component: Button,
} as Meta<typeof Button>;
};

export default meta;

const Template: StoryFn<typeof Button> = (args) => <Button {...args} />;
type Story = StoryObj<typeof Button>;

export const Primary = Template.bind({});
Primary.args = {
variant: 'contained',
color: 'primary',
children: 'Continue',
export const Primary: Story = {
args: {
variant: 'contained',
color: 'primary',
children: 'Continue',
},
};

export const PrimaryDisabled = Template.bind({});
PrimaryDisabled.args = {
variant: 'contained',
color: 'primary',
children: 'Continue',
disabled: true,
export const PrimaryDisabled: Story = {
args: {
...Primary.args,
disabled: true,
},
};

0 comments on commit 6b2a3fb

Please sign in to comment.