56 lines
1.1 KiB
TypeScript
56 lines
1.1 KiB
TypeScript
import 'react-material-symbols/rounded'
|
|
|
|
import type { Meta, StoryObj } from '@storybook/react'
|
|
|
|
import { fn } from '@storybook/test'
|
|
|
|
import { MaterialIcon } from '../Icons/MaterialIcon/MaterialIcon.tsx'
|
|
import { ChipButton } from './ChipButton.tsx'
|
|
import { config as chipButtonConfig } from './variants'
|
|
|
|
const meta: Meta<typeof ChipButton> = {
|
|
title: 'Components/Chip/ChipButton',
|
|
component: ChipButton,
|
|
argTypes: {
|
|
variant: {
|
|
control: 'select',
|
|
type: 'string',
|
|
options: Object.keys(chipButtonConfig.variants.variant),
|
|
},
|
|
onPress: {
|
|
table: {
|
|
disable: true,
|
|
},
|
|
},
|
|
},
|
|
}
|
|
|
|
export default meta
|
|
|
|
type Story = StoryObj<typeof ChipButton>
|
|
|
|
export const Default: Story = {
|
|
args: {
|
|
onPress: fn(),
|
|
children: (
|
|
<>
|
|
Button Chip
|
|
<MaterialIcon icon="chevron_right" size={20} />
|
|
</>
|
|
),
|
|
},
|
|
}
|
|
|
|
export const Outlined: Story = {
|
|
args: {
|
|
variant: 'Outlined',
|
|
onPress: fn(),
|
|
children: (
|
|
<>
|
|
Button Chip
|
|
<MaterialIcon icon="keyboard_arrow_down" size={20} />
|
|
</>
|
|
),
|
|
},
|
|
}
|