@@ -38,13 +38,13 @@ import { ListItem } from "../List/ListItem";
38
38
import { useBentoConfig } from "../BentoConfigContext" ;
39
39
import { useSprinkles } from "../SprinklesContext" ;
40
40
41
- export function Control < A , IsMulti extends boolean > ( {
41
+ export function Control < A > ( {
42
42
selectProps : { validationState : validation , isDisabled, isReadOnly = false } ,
43
43
innerProps,
44
44
innerRef,
45
45
menuIsOpen,
46
46
children,
47
- } : ControlProps < A , IsMulti > ) {
47
+ } : ControlProps < A > ) {
48
48
const inputConfig = useBentoConfig ( ) . input ;
49
49
50
50
return (
@@ -64,7 +64,7 @@ export function Control<A, IsMulti extends boolean>({
64
64
) ;
65
65
}
66
66
67
- export function ValueContainer < A , IsMulti extends boolean > ( props : ValueContainerProps < A , IsMulti > ) {
67
+ export function ValueContainer < A > ( props : ValueContainerProps < A > ) {
68
68
const sprinkles = useSprinkles ( ) ;
69
69
return (
70
70
< defaultComponents . ValueContainer
@@ -76,11 +76,7 @@ export function ValueContainer<A, IsMulti extends boolean>(props: ValueContainer
76
76
) ;
77
77
}
78
78
79
- export function SingleValue < A , IsMulti extends boolean > ( {
80
- children,
81
- isDisabled,
82
- data,
83
- } : SingleValueProps < A , IsMulti > ) {
79
+ export function SingleValue < A > ( { children, isDisabled, data } : SingleValueProps < A > ) {
84
80
const inputConfig = useBentoConfig ( ) . input ;
85
81
86
82
return (
@@ -101,10 +97,7 @@ export function SingleValue<A, IsMulti extends boolean>({
101
97
) ;
102
98
}
103
99
104
- export function Placeholder < A , IsMulti extends boolean > ( {
105
- children,
106
- isDisabled,
107
- } : PlaceholderProps < A , IsMulti > ) {
100
+ export function Placeholder < A > ( { children, isDisabled } : PlaceholderProps < A > ) {
108
101
const inputConfig = useBentoConfig ( ) . input ;
109
102
110
103
return (
@@ -116,10 +109,10 @@ export function Placeholder<A, IsMulti extends boolean>({
116
109
) ;
117
110
}
118
111
119
- export function DropdownIndicator < A , IsMulti extends boolean > ( {
112
+ export function DropdownIndicator < A > ( {
120
113
isDisabled,
121
114
selectProps : { isReadOnly } ,
122
- } : DropdownIndicatorProps < A , IsMulti > ) {
115
+ } : DropdownIndicatorProps < A > ) {
123
116
if ( isReadOnly ) return null ;
124
117
return (
125
118
< Box paddingLeft = { 16 } >
@@ -128,7 +121,7 @@ export function DropdownIndicator<A, IsMulti extends boolean>({
128
121
) ;
129
122
}
130
123
131
- export function Input < A , IsMulti extends boolean > ( props : InputProps < A , IsMulti > ) {
124
+ export function Input < A > ( props : InputProps < A > ) {
132
125
const inputConfig = useBentoConfig ( ) . input ;
133
126
134
127
return (
@@ -143,7 +136,7 @@ export function Input<A, IsMulti extends boolean>(props: InputProps<A, IsMulti>)
143
136
) ;
144
137
}
145
138
146
- export function Menu < A , IsMulti extends boolean > ( props : MenuProps < A , IsMulti > ) {
139
+ export function Menu < A > ( props : MenuProps < A > ) {
147
140
const dropdownConfig = useBentoConfig ( ) . dropdown ;
148
141
const sprinkles = useSprinkles ( ) ;
149
142
@@ -177,9 +170,7 @@ export function Menu<A, IsMulti extends boolean>(props: MenuProps<A, IsMulti>) {
177
170
) ;
178
171
}
179
172
180
- export function MenuList < A extends { disabled ?: boolean } , IsMulti extends boolean > (
181
- props : MenuListProps < A , IsMulti >
182
- ) {
173
+ export function MenuList < A extends { disabled ?: boolean } > ( props : MenuListProps < A > ) {
183
174
const dropdownConfig = useBentoConfig ( ) . dropdown ;
184
175
185
176
return (
@@ -220,9 +211,7 @@ export function MenuList<A extends { disabled?: boolean }, IsMulti extends boole
220
211
) ;
221
212
}
222
213
223
- export function Option < B , A extends SelectOption < B > , IsMulti extends boolean > (
224
- props : OptionProps < A , IsMulti >
225
- ) {
214
+ export function Option < B , A extends SelectOption < B > > ( props : OptionProps < A > ) {
226
215
return (
227
216
< defaultComponents . Option { ...props } >
228
217
< ListItem
@@ -243,13 +232,11 @@ export function Option<B, A extends SelectOption<B>, IsMulti extends boolean>(
243
232
) ;
244
233
}
245
234
246
- export function MenuPortal < A , IsMulti extends boolean > (
247
- props : MenuPortalProps < A , IsMulti , GroupBase < A > >
248
- ) {
235
+ export function MenuPortal < A > ( props : MenuPortalProps < A , boolean , GroupBase < A > > ) {
249
236
return < defaultComponents . MenuPortal { ...props } /> ;
250
237
}
251
238
252
- export function NoOptionsMessage < A , IsMulti extends boolean > ( props : NoticeProps < A , IsMulti > ) {
239
+ export function NoOptionsMessage < A > ( props : NoticeProps < A > ) {
253
240
return (
254
241
< Inset space = { 16 } >
255
242
< Inline space = { 0 } align = "center" alignY = "center" >
@@ -263,11 +250,13 @@ export function NoOptionsMessage<A, IsMulti extends boolean>(props: NoticeProps<
263
250
264
251
export const IndicatorSeparator = null ;
265
252
266
- export const styles = < A , IsMulti extends boolean > ( ) : StylesConfig < A , IsMulti > => ( {
267
- menuPortal : ( { zIndex, ...provided } ) => provided ,
268
- valueContainer : ( { padding, ...provided } ) => provided ,
269
- input : ( { margin, paddingBottom, paddingTop, color, ...provided } ) => provided ,
270
- menu : ( ) => ( { } ) ,
271
- menuList : ( { paddingTop, paddingBottom, ...provided } ) => provided ,
272
- option : ( ) => ( { } ) ,
273
- } ) ;
253
+ export function styles < A > ( ) : StylesConfig < A > {
254
+ return {
255
+ menuPortal : ( { zIndex, ...provided } ) => provided ,
256
+ valueContainer : ( { padding, ...provided } ) => provided ,
257
+ input : ( { margin, paddingBottom, paddingTop, color, ...provided } ) => provided ,
258
+ menu : ( ) => ( { } ) ,
259
+ menuList : ( { paddingTop, paddingBottom, ...provided } ) => provided ,
260
+ option : ( ) => ( { } ) ,
261
+ } ;
262
+ }
0 commit comments