File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
packages/components/src/components/Select Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,9 @@ interface SelectProps extends Omit<ComponentProps<'div'>, 'onChange'> {
5555 showCheck ?: boolean
5656 value : string
5757 } [ ]
58+ triggerProps ?: ComponentProps < typeof SelectTrigger >
59+ containerProps ?: ComponentProps < typeof SelectContainer >
60+ optionProps ?: ComponentProps < typeof SelectOption >
5861}
5962
6063export function Select ( {
@@ -69,6 +72,9 @@ export function Select({
6972 colors,
7073 typography,
7174 options,
75+ triggerProps,
76+ containerProps,
77+ optionProps,
7278 ...props
7379} : SelectProps ) {
7480 const ref = useRef < HTMLDivElement > ( null )
@@ -143,10 +149,14 @@ export function Select({
143149 >
144150 { options ? (
145151 < >
146- < SelectTrigger > { children } </ SelectTrigger >
147- < SelectContainer >
152+ < SelectTrigger { ... triggerProps } > { children } </ SelectTrigger >
153+ < SelectContainer { ... containerProps } >
148154 { options ?. map ( ( option ) => (
149- < SelectOption { ...option } key = { 'option-' + option . value } >
155+ < SelectOption
156+ { ...optionProps }
157+ { ...option }
158+ key = { 'option-' + option . value }
159+ >
150160 { option . label ?? option . value }
151161 </ SelectOption >
152162 ) ) }
You can’t perform that action at this time.
0 commit comments