diff --git a/packages/ui/Input/Select.tsx b/packages/ui/Input/Select.tsx index 293b576..ac15e25 100644 --- a/packages/ui/Input/Select.tsx +++ b/packages/ui/Input/Select.tsx @@ -1,3 +1,4 @@ +import type { ReactNode } from 'react'; import { useState, useRef, useEffect, useCallback, createContext, useContext } from 'react'; import { IconChevronDown, IconUser } from '@sopt-makers/icons'; import { createPortal } from 'react-dom'; @@ -147,10 +148,13 @@ function SelectTrigger({ children }: SelectTriggerProps) { interface SelectTriggerContentProps { placeholder?: string; className?: string; + icon?: ReactNode; } // Select.TriggerContent 컴포넌트: trigger의 미리 정의된 UI -function SelectTriggerContent({ placeholder, className }: SelectTriggerContentProps) { +function SelectTriggerContent(props: SelectTriggerContentProps) { + const { placeholder, className, icon } = props; + const { open, selected } = useSelectContext(); const selectedLabel = selected ? selected.label : placeholder; @@ -158,14 +162,18 @@ function SelectTriggerContent({ placeholder, className }: SelectTriggerContentPr return (
{selectedLabel}
-