delete catalog

This commit is contained in:
hamid zarghami
2026-03-14 16:27:40 +03:30
parent f4f617f8d2
commit 18b9bf820f
6 changed files with 50 additions and 13 deletions
+4 -3
View File
@@ -22,7 +22,7 @@ const ModalConfrim: FC<Props> = (props: Props) => {
<DefaulModal
open={props.isOpen}
close={props.close}
title_header={t('confrim.subject')}
title_header={'حذف'}
isHeader
>
<div className='mt-6'>
@@ -31,7 +31,7 @@ const ModalConfrim: FC<Props> = (props: Props) => {
props.label ?
props.label
:
t('confrim.content')
'برای حذف این آیتم مطمئن هستید؟'
}
{
@@ -49,13 +49,14 @@ const ModalConfrim: FC<Props> = (props: Props) => {
<div className='flex gap-4 justify-center mt-10'>
<Button
className='w-full'
onClick={() => props.onConfrim(props.isHasDescription ? description : undefined)}
disabled={props.isloading}
>
بله
</Button>
<Button
className='bg-transparent text-black border border-primary'
className='bg-transparent w-full hover:bg-gray-100 text-black border border-primary'
onClick={props.close}
>
لغو
+5 -4
View File
@@ -4,17 +4,18 @@ import ModalConfrim from './ModalConfrim'
interface Props {
onDelete: () => void,
isloading?: boolean
isloading?: boolean,
colorIcon?: string,
}
const TrashWithConfrim: FC<Props> = ({ onDelete, isloading = false }) => {
const TrashWithConfrim: FC<Props> = ({ onDelete, colorIcon, isloading = false }) => {
const [isConfirm, setIsConfirm] = useState(false)
return (
<div>
<Trash
onClick={() => setIsConfirm(true)}
className='size-5'
color='#888'
className='size-[18px]'
color={colorIcon ? colorIcon : '#888'}
/>
<ModalConfrim