@@ -144,18 +144,18 @@ function SelectTrigger({ children }: SelectTriggerProps) {
144
144
}
145
145
146
146
interface SelectTriggerContentProps {
147
- className ?: string ;
148
147
placeholder ?: string ;
148
+ className ?: string ;
149
149
}
150
150
151
151
// Select.TriggerContent 컴포넌트: trigger의 미리 정의된 UI
152
- function SelectTriggerContent ( { className , placeholder } : SelectTriggerContentProps ) {
152
+ function SelectTriggerContent ( { placeholder , className } : SelectTriggerContentProps ) {
153
153
const { open, selected } = useSelectContext ( ) ;
154
154
155
155
const selectedLabel = selected ? selected . label : placeholder ;
156
156
157
157
return (
158
- < div className = { `${ S . select } ${ open ? S . focus : '' } ${ className ? className : '' } ` } >
158
+ < div className = { `${ S . select } ${ open ? S . focus : '' } ${ className } ` } >
159
159
< p className = { ! selected ? S . selectPlaceholder : '' } > { selectedLabel } </ p >
160
160
< IconChevronDown
161
161
style = { {
@@ -171,18 +171,19 @@ function SelectTriggerContent({ className, placeholder }: SelectTriggerContentPr
171
171
172
172
interface SelectMenuProps {
173
173
children : React . ReactNode ;
174
+ className ?: string ;
174
175
}
175
176
176
177
// SelectMenu 컴포넌트: 옵션 목록을 렌더링
177
- function SelectMenu ( { children } : SelectMenuProps ) {
178
+ function SelectMenu ( { children, className } : SelectMenuProps ) {
178
179
const { open, optionsRef, calcMaxHeight } = useSelectContext ( ) ;
179
180
180
181
if ( ! open ) {
181
182
return null ;
182
183
}
183
184
184
185
return (
185
- < ul className = { S . optionList } ref = { optionsRef } style = { { maxHeight : calcMaxHeight ( ) } } >
186
+ < ul className = { ` ${ S . optionList } ${ className } ` } ref = { optionsRef } style = { { maxHeight : calcMaxHeight ( ) } } >
186
187
{ children }
187
188
</ ul >
188
189
) ;
@@ -191,10 +192,11 @@ function SelectMenu({ children }: SelectMenuProps) {
191
192
interface SelectMenuItemProps < T > {
192
193
option : Option < T > ;
193
194
onClick ?: ( ) => void ;
195
+ className ?: string ;
194
196
}
195
197
196
198
// SelectMenuItem 컴포넌트: 옵션 목록 하나의 UI
197
- function SelectMenuItem < T > ( { option, onClick } : SelectMenuItemProps < T > ) {
199
+ function SelectMenuItem < T > ( { option, onClick, className } : SelectMenuItemProps < T > ) {
198
200
const { open, type, handleOptionClick } = useSelectContext ( ) ;
199
201
200
202
const handleClick = ( ) => {
@@ -211,7 +213,7 @@ function SelectMenuItem<T>({ option, onClick }: SelectMenuItemProps<T>) {
211
213
212
214
return (
213
215
< li >
214
- < button className = { S . option } onClick = { handleClick } type = 'button' >
216
+ < button className = { ` ${ S . option } ${ className } ` } onClick = { handleClick } type = 'button' >
215
217
{ type === 'textIcon' && option . icon }
216
218
{ ( type === 'userList' || type === 'userListDesc' ) &&
217
219
( option . profileUrl ? (
0 commit comments