From 662bdd413beabf7747fde7f648b191da1c3cddd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=B0=BD=EC=88=98?= Date: Wed, 22 Jan 2025 18:03:46 +0900 Subject: [PATCH] =?UTF-8?q?react-select=20=EB=9D=BC=EC=9D=B4=EB=B8=8C?= =?UTF-8?q?=EB=9F=AC=EB=A6=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/reactselect/ReactSelect.jsx | 24 +++++++++++++++++++ src/styles/_reset.scss | 16 ++++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/src/components/common/reactselect/ReactSelect.jsx b/src/components/common/reactselect/ReactSelect.jsx index 70c8e53..5fe8120 100644 --- a/src/components/common/reactselect/ReactSelect.jsx +++ b/src/components/common/reactselect/ReactSelect.jsx @@ -32,10 +32,33 @@ export default function ReactSelect(){ setSelect('') } } + + +const CustomOption = (props) => { + const { data, innerRef, innerProps, isSelected, isFocused, isDisabled } = props; + const customClass = data.value === '6' ? 'special-option' : ''; + + // 기본 선택/호버 상태 적용 + const optionClass = `${customClass} ${isSelected ? 'custom__option--is-selected' : ''} + ${isFocused ? 'custom__option--is-focused' : ''} + ${isDisabled ? 'custom__option--is-disabled' : ''}`; + + return ( +
+ {data.label} +
+ ); +}; + return(