feat: modify routing to nested mode and rename document (#52)
* feat: modify routing to nested mode * feat: rename document
This commit is contained in:
0
web/src/components/deleting-confirm/index.less
Normal file
0
web/src/components/deleting-confirm/index.less
Normal file
28
web/src/components/deleting-confirm/index.tsx
Normal file
28
web/src/components/deleting-confirm/index.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import { ExclamationCircleFilled } from '@ant-design/icons';
|
||||
import { Modal } from 'antd';
|
||||
|
||||
const { confirm } = Modal;
|
||||
|
||||
interface IProps {
|
||||
onOk?: (...args: any[]) => any;
|
||||
onCancel?: (...args: any[]) => any;
|
||||
}
|
||||
|
||||
export const showDeleteConfirm = ({ onOk, onCancel }: IProps) => {
|
||||
confirm({
|
||||
title: 'Are you sure delete this item?',
|
||||
icon: <ExclamationCircleFilled />,
|
||||
content: 'Some descriptions',
|
||||
okText: 'Yes',
|
||||
okType: 'danger',
|
||||
cancelText: 'No',
|
||||
onOk() {
|
||||
onOk?.();
|
||||
},
|
||||
onCancel() {
|
||||
onCancel?.();
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
export default showDeleteConfirm;
|
||||
Reference in New Issue
Block a user