WIP: 설문 보기 작업중

This commit is contained in:
2025-05-30 18:40:14 +09:00
parent a7adb4d1d9
commit c39da5d9d5
5 changed files with 173 additions and 4 deletions
+4 -1
View File
@@ -1,5 +1,6 @@
import { useQuery } from "@tanstack/react-query";
import {
cn,
Select,
SelectContent,
SelectItem,
@@ -12,12 +13,14 @@ import { CodeApi } from "../api/code-service";
type CodeSelectProps = {
upCd: string;
placeholder?: string;
className?: string;
} & React.ComponentPropsWithoutRef<typeof Select>;
function CodeSelect({
upCd,
defaultValue,
placeholder = "선택",
className,
...props
}: CodeSelectProps) {
const { data: code } = useQuery({
@@ -31,7 +34,7 @@ function CodeSelect({
return (
<Select {...props}>
<SelectTrigger className="w-[12rem]">
<SelectTrigger className={cn("w-[12rem]", className)}>
<SelectValue placeholder={defaultValueText} />
</SelectTrigger>
<SelectContent>