-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Create a story for IconButton component
- Loading branch information
1 parent
9395988
commit 90b19c2
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from 'react'; | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import IconButton from './icon-button'; | ||
|
||
const meta: Meta<typeof IconButton> = { | ||
title: 'UI/IconButton', | ||
component: IconButton, | ||
parameters: { | ||
docs: { | ||
// Assuming there's a README.mdx file in the same directory for documentation | ||
page: require('./README.mdx'), | ||
}, | ||
}, | ||
argTypes: { | ||
onClick: { | ||
action: 'clicked', | ||
}, | ||
icon: { | ||
control: 'text', | ||
description: 'The icon to display', | ||
}, | ||
title: { | ||
control: 'text', | ||
description: 'The title text for the button', | ||
}, | ||
}, | ||
args: { | ||
icon: 'settings', | ||
title: 'Settings', | ||
}, | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof IconButton>; | ||
|
||
export const Default: Story = { | ||
render: (args) => <IconButton {...args} />, | ||
}; |