Skip to content

Conversation

@minimo-9
Copy link
Collaborator

๐Ÿ“Œ ๋ณ€๊ฒฝ ์‚ฌํ•ญ ๊ฐœ์š”

DropdownProps๋ฅผ ์ œ๋„ค๋ฆญ ํƒ€์ž…์œผ๋กœ ๋ณ€๊ฒฝ

๐Ÿ“ ์ƒ์„ธ ๋‚ด์šฉ

๋“œ๋กญ๋‹ค์šด ์ƒ์ˆ˜๋ฅผ ํƒ€์ž…์œผ๋กœ ๋ณ€๊ฒฝํ•จ์œผ๋กœ์„œ ๊ธฐ์กด ๋“œ๋กญ๋‹ค์šด์— ํƒ€์ž…์ด string์œผ๋กœ ๋˜์–ด ์˜ค๋ฅ˜๊ฐ€ ๋‚˜๋˜ ๋ถ€๋ถ„์„ ์ œ๋„ค๋ฆญ ํƒ€์ž…์œผ๋กœ ๋ณ€๊ฒฝํ•˜์—ฌ ์˜ค๋ฅ˜ ์™„ํ™”

๐Ÿ”— ๊ด€๋ จ ์ด์Šˆ

๐Ÿ–ผ๏ธ ์Šคํฌ๋ฆฐ์ƒท(์„ ํƒ์‚ฌํ•ญ)

๐Ÿ’ก ์ฐธ๊ณ  ์‚ฌํ•ญ

@minimo-9 minimo-9 requested review from a user, Moon-ju-young and Yun-Jinwoo June 18, 2025 05:04
@minimo-9 minimo-9 self-assigned this Jun 18, 2025
@minimo-9 minimo-9 added the ๐Ÿ› ๋ฒ„๊ทธ ์ˆ˜์ • ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•˜๊ฑฐ๋‚˜ ์˜ˆ์ƒ์น˜ ๋ชปํ•œ ๋ฒ„๊ทธ๋ฅผ ๊ณ ์ณค์–ด์š”! label Jun 18, 2025
@minimo-9 minimo-9 linked an issue Jun 18, 2025 that may be closed by this pull request
1 task
Copy link
Collaborator

@Yun-Jinwoo Yun-Jinwoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐Ÿ‘๐Ÿ‘

Comment on lines 10 to 24
interface DropdownProps<OptionType extends string> {
options: readonly OptionType[];
selected: OptionType;
setSelect: Dispatch<SetStateAction<OptionType>>; // Dispatch<SetStateAction<string>>๋Š” setํ•จ์ˆ˜ ํƒ€์ž…
placeholder?: string;
variant: 'form' | 'filter';
}

export default function Dropdown({
export default function Dropdown<OptionType extends string>({
options,
selected,
setSelect,
placeholder = '์„ ํƒ',
variant,
}: DropdownProps) {
}: DropdownProps<OptionType>) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐Ÿ’ฌ generic type์ด๋ผ๋ฉด ๊ทธ๋ƒฅ OptionType ๋ง๊ณ  ๊ฐ„๋‹จํ•˜๊ฒŒ T๋ผ๊ณ  ์ ์–ด๋„ ๋˜์ง€ ์•Š๋‚˜ ์‹ถ๋„ค์š”!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์•„ ์›๋ž˜ T๋กœ ํ•˜๋ ค๊ณ  ํ–ˆ๋Š”๋ฐ ์ข€ ๋” ์•Œ์•„๋ณด๊ธฐ ์ข‹๊ฒŒ ์˜ต์…˜์œผ๋กœ ๋„ฃ์—ˆ์Šต๋‹ˆ๋‹ค!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ณ€๊ฒฝํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค!

@minimo-9 minimo-9 merged commit e2c0df9 into develop Jun 18, 2025
2 checks passed
@minimo-9 minimo-9 deleted the fix/105-dropdown-type-change branch June 18, 2025 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

๐Ÿ› ๋ฒ„๊ทธ ์ˆ˜์ • ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•˜๊ฑฐ๋‚˜ ์˜ˆ์ƒ์น˜ ๋ชปํ•œ ๋ฒ„๊ทธ๋ฅผ ๊ณ ์ณค์–ด์š”!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] ๋“œ๋กญ๋‹ค์šด interface ํƒ€์ž… ๋ณ€๊ฒฝ

4 participants