1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
| import { Modal } from 'antd';
| import React, { PropsWithChildren } from 'react';
|
| interface CreateFormProps {
| modalVisible: boolean;
| onCancel: () => void;
| }
|
| const CreateForm: React.FC<PropsWithChildren<CreateFormProps>> = (props) => {
| const { modalVisible, onCancel } = props;
|
| return (
| <Modal
| destroyOnClose
| title="新建"
| width={420}
| open={modalVisible}
| onCancel={() => onCancel()}
| footer={null}
| >
| {props.children}
| </Modal>
| );
| };
|
| export default CreateForm;
|
|