-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #374 from lifeomic/csf3-c
Update C- Component to Storybook CSF3
- Loading branch information
Showing
4 changed files
with
352 additions
and
339 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
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 |
---|---|---|
@@ -1,33 +1,34 @@ | ||
import React from 'react'; | ||
import { ComponentStory, ComponentMeta } from '@storybook/react'; | ||
import { StoryObj, Meta } from '@storybook/react'; | ||
|
||
import { Chip } from './Chip'; | ||
|
||
export default { | ||
title: 'Components/Chip', | ||
const meta: Meta<typeof Chip> = { | ||
component: Chip, | ||
argTypes: {}, | ||
} as ComponentMeta<typeof Chip>; | ||
|
||
const Template: ComponentStory<typeof Chip> = (args) => <Chip {...args} />; | ||
|
||
export const Default = Template.bind({}); | ||
Default.args = { | ||
label: 'Chip', | ||
args: { | ||
label: 'Chip', | ||
}, | ||
}; | ||
export default meta; | ||
type Story = StoryObj<typeof Chip>; | ||
|
||
export const OnDelete = Template.bind({}); | ||
OnDelete.parameters = { | ||
docs: { | ||
description: { | ||
story: | ||
'The function to call when the removal button is clicked. Note that this does not ' + | ||
'actually do anything to the Chip component, removing the element from the DOM is ' + | ||
'up to the consumer to take care of.\n\n' + | ||
'To display a Chip, but not display the removal button, do not provide this prop.', | ||
export const Default: Story = {}; | ||
|
||
export const OnDelete: Story = { | ||
parameters: { | ||
docs: { | ||
description: { | ||
story: | ||
'The function to call when the removal button is clicked. Note that this does not ' + | ||
'actually do anything to the Chip component, removing the element from the DOM is ' + | ||
'up to the consumer to take care of.\n\n' + | ||
'To display a Chip, but not display the removal button, do not provide this prop.', | ||
}, | ||
}, | ||
}, | ||
}; | ||
OnDelete.args = { | ||
label: 'Chip', | ||
|
||
export const DisableDelete: Story = { | ||
args: { | ||
disableDelete: true, | ||
}, | ||
}; |
Oops, something went wrong.