import { useState } from 'react'
import {
MultiSelectGroup,
default as MultiSelect,
MultiSelectGroupProps,
} from '.'
import { Meta, StoryObj } from '@storybook/react-vite'
import { action } from 'storybook/actions'
const StyledMultiSelectGroup = (props: MultiSelectGroupProps) => {
return (
)
}
export default {
title: 'react/MultiSelect',
component: MultiSelect,
argTypes: {
variant: {
control: {
type: 'inline-radio',
options: ['default', 'overlay'],
},
},
},
args: {
variant: 'default',
},
} as Meta
export const Basic: StoryObj = {
render: function Render(args) {
const options = ['選択肢1', '選択肢2', '選択肢3', '選択肢4']
return (
{options.map((option) => (
{option}
))}
)
},
}
export const Invalid: StoryObj = {
render: function Render(args) {
const options = ['選択肢1', '選択肢2', '選択肢3', '選択肢4']
return (
{options.map((option) => (
{option}
))}
)
},
}
export const Overlay: StoryObj = {
render: function Render(args) {
const options = ['選択肢1', '選択肢2', '選択肢3', '選択肢4']
return (
{options.map((option) => (
{option}
))}
)
},
args: {
variant: 'overlay',
},
}
export const Playground: StoryObj = {
render: function Render(args) {
const [selected, setSelected] = useState([])
return (
{[1, 2, 3, 4].map((idx) => (
選択肢{idx}
))}
)
},
}