refactor(web): reuse the same edit-custom-collection-modal component, and fix the pop up error (#28003)

This commit is contained in:
yangzheli
2025-11-13 11:44:21 +08:00
committed by GitHub
parent 2799b79e8c
commit b0e7e7752f
3 changed files with 5 additions and 363 deletions

View File

@@ -24,6 +24,7 @@ import Toast from '@/app/components/base/toast'
type Props = {
positionLeft?: boolean
dialogClassName?: string
payload: any
onHide: () => void
onAdd?: (payload: CustomCollectionBackend) => void
@@ -33,6 +34,7 @@ type Props = {
// Add and Edit
const EditCustomCollectionModal: FC<Props> = ({
positionLeft,
dialogClassName = '',
payload,
onHide,
onAdd,
@@ -186,6 +188,7 @@ const EditCustomCollectionModal: FC<Props> = ({
positionCenter={isAdd && !positionLeft}
onHide={onHide}
title={t(`tools.createTool.${isAdd ? 'title' : 'editTitle'}`)!}
dialogClassName={dialogClassName}
panelClassName='mt-2 !w-[640px]'
maxWidthClassName='!max-w-[640px]'
height='calc(100vh - 16px)'