Skip to content

Commit b2f851e

Browse files
committed
fix: Select absolute/relative 관계 설정 수정
1 parent c8df1a7 commit b2f851e

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ddingdong-design-system",
3-
"version": "0.3.6",
3+
"version": "0.3.7",
44
"type": "module",
55
"keywords": [
66
"react",

src/shared/ui/Select/OptionList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import { cn } from '@/shared/lib/core';
55
import { useSelectContext } from './Select.context';
66

77
const optionListVariants = cva(
8-
'relative z-50 mt-1 max-h-60 w-full overflow-y-auto rounded-md border border-gray-200 bg-white font-semibold text-gray-400 shadow-lg',
8+
'absolute z-50 mt-1 max-h-60 w-full overflow-y-auto rounded-md border border-gray-200 bg-white font-semibold text-gray-400 shadow-lg',
99
{
1010
variants: {
1111
size: {
1212
md: 'text-sm min-w-24',
13-
lg: 'md:text-lg',
13+
lg: 'md:text-lg min-w-64',
1414
},
1515
},
1616
defaultVariants: {

src/shared/ui/Select/SelectMain.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,15 @@ export function SelectMain({ value, onChange, size = 'lg', defaultValue, childre
4444
size: size,
4545
}}
4646
>
47-
<SelectButton
48-
selected={value || defaultValue}
49-
onClick={() => setIsOpen(!isOpen)}
50-
size={size}
51-
isOpen={isOpen}
52-
/>
53-
{isOpen && <OptionList>{children}</OptionList>}
47+
<div className="relative w-full">
48+
<SelectButton
49+
selected={value || defaultValue}
50+
onClick={() => setIsOpen(!isOpen)}
51+
size={size}
52+
isOpen={isOpen}
53+
/>
54+
{isOpen && <OptionList>{children}</OptionList>}
55+
</div>
5456
</SelectContext.Provider>
5557
);
5658
}

0 commit comments

Comments
 (0)