feat: 수정 버튼 액션에 제목과 설명 설정 기능 추가
추가된 기능: 1. ButtonConfigPanel - 수정 모달 제목/설명 입력 필드 추가 ✅ 2. EditModal - 제목/설명 props 추가 및 조건부 헤더 렌더링 ✅ 3. DataTableConfigPanel - 수정 모달 설정 섹션 추가 ✅ 4. InteractiveDataTable - editModalConfig에서 제목/설명 읽기 ✅ 5. screen/[screenId]/page - 제목/설명 전달 추가 ✅ 6. 타입 정의 - editModalConfig 추가 ✅ 변경된 파일: - frontend/components/screen/config-panels/ButtonConfigPanel.tsx - frontend/components/screen/EditModal.tsx - frontend/components/screen/InteractiveDataTable.tsx - frontend/components/screen/panels/DataTableConfigPanel.tsx - frontend/app/(main)/screens/[screenId]/page.tsx - frontend/types/screen-legacy-backup.ts 결과: - ✅ 수정 버튼에서 모달 제목과 설명을 설정할 수 있음 - ✅ 데이터테이블에서도 수정 모달 설정 가능 - ✅ 제목과 설명이 모달 헤더에 표시됨 - ✅ 설정하지 않으면 기본 동작 유지
This commit is contained in:
@@ -395,29 +395,63 @@ export const ButtonConfigPanel: React.FC<ButtonConfigPanelProps> = ({ component,
|
||||
</div>
|
||||
|
||||
{config.action?.editMode === "modal" && (
|
||||
<div>
|
||||
<Label htmlFor="edit-modal-size">모달 크기</Label>
|
||||
<Select
|
||||
value={config.action?.modalSize || "lg"}
|
||||
onValueChange={(value) =>
|
||||
onUpdateProperty("componentConfig.action", {
|
||||
...config.action,
|
||||
modalSize: value,
|
||||
})
|
||||
}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue placeholder="모달 크기 선택" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="sm">작음 (Small)</SelectItem>
|
||||
<SelectItem value="md">보통 (Medium)</SelectItem>
|
||||
<SelectItem value="lg">큼 (Large)</SelectItem>
|
||||
<SelectItem value="xl">매우 큼 (Extra Large)</SelectItem>
|
||||
<SelectItem value="full">전체 화면 (Full)</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
<>
|
||||
<div>
|
||||
<Label htmlFor="edit-modal-title">모달 제목</Label>
|
||||
<Input
|
||||
id="edit-modal-title"
|
||||
placeholder="모달 제목을 입력하세요 (예: 데이터 수정)"
|
||||
value={config.action?.editModalTitle || ""}
|
||||
onChange={(e) =>
|
||||
onUpdateProperty("componentConfig.action", {
|
||||
...config.action,
|
||||
editModalTitle: e.target.value,
|
||||
})
|
||||
}
|
||||
/>
|
||||
<p className="mt-1 text-xs text-gray-500">비워두면 기본 제목이 표시됩니다</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="edit-modal-description">모달 설명</Label>
|
||||
<Input
|
||||
id="edit-modal-description"
|
||||
placeholder="모달 설명을 입력하세요 (예: 선택한 데이터를 수정합니다)"
|
||||
value={config.action?.editModalDescription || ""}
|
||||
onChange={(e) =>
|
||||
onUpdateProperty("componentConfig.action", {
|
||||
...config.action,
|
||||
editModalDescription: e.target.value,
|
||||
})
|
||||
}
|
||||
/>
|
||||
<p className="mt-1 text-xs text-gray-500">비워두면 설명이 표시되지 않습니다</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="edit-modal-size">모달 크기</Label>
|
||||
<Select
|
||||
value={config.action?.modalSize || "lg"}
|
||||
onValueChange={(value) =>
|
||||
onUpdateProperty("componentConfig.action", {
|
||||
...config.action,
|
||||
modalSize: value,
|
||||
})
|
||||
}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue placeholder="모달 크기 선택" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="sm">작음 (Small)</SelectItem>
|
||||
<SelectItem value="md">보통 (Medium)</SelectItem>
|
||||
<SelectItem value="lg">큼 (Large)</SelectItem>
|
||||
<SelectItem value="xl">매우 큼 (Extra Large)</SelectItem>
|
||||
<SelectItem value="full">전체 화면 (Full)</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user