first commit
This commit is contained in:
30
frontend/node_modules/antd/es/modal/components/ConfirmCancelBtn.js
generated
vendored
Normal file
30
frontend/node_modules/antd/es/modal/components/ConfirmCancelBtn.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use client";
|
||||
|
||||
import React, { useContext } from 'react';
|
||||
import ActionButton from '../../_util/ActionButton';
|
||||
import { ModalContext } from '../context';
|
||||
const ConfirmCancelBtn = () => {
|
||||
const {
|
||||
autoFocusButton,
|
||||
cancelButtonProps,
|
||||
cancelTextLocale,
|
||||
isSilent,
|
||||
mergedOkCancel,
|
||||
rootPrefixCls,
|
||||
close,
|
||||
onCancel,
|
||||
onConfirm
|
||||
} = useContext(ModalContext);
|
||||
return mergedOkCancel ? (/*#__PURE__*/React.createElement(ActionButton, {
|
||||
isSilent: isSilent,
|
||||
actionFn: onCancel,
|
||||
close: (...args) => {
|
||||
close === null || close === void 0 ? void 0 : close.apply(void 0, args);
|
||||
onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(false);
|
||||
},
|
||||
autoFocus: autoFocusButton === 'cancel',
|
||||
buttonProps: cancelButtonProps,
|
||||
prefixCls: `${rootPrefixCls}-btn`
|
||||
}, cancelTextLocale)) : null;
|
||||
};
|
||||
export default ConfirmCancelBtn;
|
||||
Reference in New Issue
Block a user