Feat/new confirm (#6984)

This commit is contained in:
Yi Xiao
2024-08-06 14:31:13 +08:00
committed by GitHub
parent bd3ed89516
commit 0c22e4e3d1
33 changed files with 192 additions and 461 deletions

View File

@@ -8,7 +8,7 @@ import { Edit02 } from '@/app/components/base/icons/src/vender/line/general'
import type { ApiBasedExtension } from '@/models/common'
import { useModalContext } from '@/context/modal-context'
import { deleteApiBasedExtension } from '@/service/common'
import ConfirmCommon from '@/app/components/base/confirm/common'
import Confirm from '@/app/components/base/confirm'
type ItemProps = {
data: ApiBasedExtension
@@ -57,18 +57,14 @@ const Item: FC<ItemProps> = ({
</div>
</div>
{
showDeleteConfirm && (
<ConfirmCommon
type='danger'
showDeleteConfirm
&& <Confirm
isShow={showDeleteConfirm}
onCancel={() => setShowDeleteConfirm(false)}
title={`${t('common.operation.delete')}${data.name}”?`}
onConfirm={handleDeleteApiBasedExtension}
confirmWrapperClassName='!z-30'
confirmText={t('common.operation.delete') || ''}
confirmBtnClassName='!bg-[#D92D20]'
/>
)
}
</div>
)