let bryntumGantt: any;
try {
bryntumGantt = require('@bryntum/gantt');
} catch {
console.warn('@bryntum/gantt is not available.');
}
const { MessageDialog } = bryntumGantt;
const poolRowDeleteOnClick =
(messageDialog: any, AjaxHelper: any) =>
async ({ record }: { record: any }) => {
const poolsDeleteUrl = '/Resource/Pools/DeletePool?poolId=';
if (record.poolId > 0) {
const result = MessageDialog.confirm({
title: messageDialog.current.title,
message: messageDialog.current.message,
okButton: messageDialog.current.okButton,
cancelButton: messageDialog.current.cancelButton,
});
if (result === MessageDialog.okButton) {
AjaxHelper.post(poolsDeleteUrl + record.poolId);
record.remove();
}
}
};
my code is this I want to use the Mui button component for the okButton