added data props in confrima modal

This commit is contained in:
Pramod Mahajan 2025-05-09 15:13:04 +05:30
parent a816d4fdeb
commit dbbbf9ee02

View File

@ -1,6 +1,6 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
const ConfirmModal = ({ type, onSubmit, onClose, message, loading ,header}) => { const ConfirmModal = ({ type, onSubmit, onClose, message, loading ,header, paramData}) => {
const TypeofIcon = (type) => { const TypeofIcon = (type) => {
switch (type) { switch (type) {
@ -48,7 +48,7 @@ const ConfirmModal = ({ type, onSubmit, onClose, message, loading ,header}) => {
<div className='d-flex justify-content-end mt-4'> <div className='d-flex justify-content-end mt-4'>
<button <button
className='btn btn-primary btn-sm' className='btn btn-primary btn-sm'
onClick={onSubmit} onClick={()=>onSubmit(paramData)}
disabled={loading} disabled={loading}
> >
{loading ? "Please Wait..." : "Yes"} {loading ? "Please Wait..." : "Yes"}