11import { css , Flex } from '@devup-ui/react'
22import { Meta , StoryObj } from '@storybook/react-vite'
3- import { useState } from 'react'
3+ import { ComponentProps , useState } from 'react'
44
55import {
66 Select ,
99 SelectOption ,
1010 SelectTrigger ,
1111} from '.'
12- import { Default as DefaultComponent } from './Default'
1312import { IconArrow } from './IconArrow'
1413
1514export type Story = StoryObj < typeof meta >
@@ -29,7 +28,6 @@ const meta: Meta<typeof Select> = {
2928
3029export const DefaultStory : Story = {
3130 args : {
32- type : 'default' ,
3331 colors : { } ,
3432 } ,
3533 render : ( args ) => < DefaultComponent { ...args } /> ,
@@ -47,6 +45,46 @@ export const ControlledCheckboxStory: Story = {
4745
4846export default meta
4947
48+ export function DefaultComponent ( {
49+ ...props
50+ } : Omit < ComponentProps < typeof Select > , 'children' > ) {
51+ return (
52+ < Select { ...props } >
53+ < SelectTrigger > Select</ SelectTrigger >
54+ < SelectContainer >
55+ < SelectOption disabled value = "Option 1" >
56+ Option 1
57+ </ SelectOption >
58+ < SelectOption value = "Option 2" > Option 2</ SelectOption >
59+ < SelectDivider />
60+ < SelectOption value = "Option 3" > Option 3</ SelectOption >
61+ < SelectOption disabled value = "Option 4" >
62+ Option 4
63+ </ SelectOption >
64+ < Select type = "radio" >
65+ < SelectTrigger asChild >
66+ < SelectOption >
67+ < Flex alignItems = "center" justifyContent = "space-between" w = "100%" >
68+ Option 5< IconArrow />
69+ </ Flex >
70+ </ SelectOption >
71+ </ SelectTrigger >
72+ < SelectContainer
73+ className = { css ( {
74+ right : '0' ,
75+ top : '0' ,
76+ transform : 'translateX(100%)' ,
77+ } ) }
78+ >
79+ < SelectOption value = "Option 6" > Option 6</ SelectOption >
80+ < SelectOption value = "Option 7" > Option 7</ SelectOption >
81+ </ SelectContainer >
82+ </ Select >
83+ </ SelectContainer >
84+ </ Select >
85+ )
86+ }
87+
5088function ControlledCheckbox ( ) {
5189 const [ value , setValue ] = useState < string [ ] > ( [ ] )
5290 const handleChange = ( nextValue : string ) => {
0 commit comments