import React from 'react'; import type { FormProps } from 'antd'; import { Button, Checkbox, Form, Input } from 'antd'; type FieldType = { username?: string; password?: string; remember?: string; }; const onFinish: FormProps['onFinish'] = (values) => { console.log('Success:', values); }; const onFinishFailed: FormProps['onFinishFailed'] = (errorInfo) => { console.log('Failed:', errorInfo); }; const App: React.FC = () => (
label="Username" name="username" rules={[{ required: true, message: 'Please input your username!' }]} > label="Password" name="password" rules={[{ required: true, message: 'Please input your password!' }]} > name="remember" valuePropName="checked" wrapperCol={{ offset: 8, span: 16 }} > Remember me ); export default App;