feat: Add FeedbackModal #2088 (#2089)

### What problem does this PR solve?

feat: Add FeedbackModal #2088

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-08-26 11:53:56 +08:00
committed by GitHub
parent 99af1cbeac
commit b4a5d83b44
3 changed files with 101 additions and 2 deletions

View File

@ -0,0 +1,37 @@
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;