File size: 919 Bytes
08ede16 |
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 27 28 29 30 31 32 33 34 35 36 37 38 |
import { Form, Input, Modal } from 'antd';
import { IModalProps } from '@/interfaces/common';
type FieldType = {
username?: string;
};
const FeedbackModal = ({ visible, hideModal }: IModalProps<any>) => {
const [form] = Form.useForm();
const handleOk = async () => {
const ret = await form.validateFields();
};
return (
<Modal title="Feedback" open={visible} onOk={handleOk} onCancel={hideModal}>
<Form
name="basic"
labelCol={{ span: 0 }}
wrapperCol={{ span: 24 }}
style={{ maxWidth: 600 }}
autoComplete="off"
form={form}
>
<Form.Item<FieldType>
name="username"
rules={[{ required: true, message: 'Please input your username!' }]}
>
<Input.TextArea rows={8} placeholder="Please input your username!" />
</Form.Item>
</Form>
</Modal>
);
};
export default FeedbackModal;
|