import React from 'react'; import { Button, Checkbox, Form, Input } from 'antd'; const onFinish = (values: any) => { console.log('Success:', values); }; const onFinishFailed = (errorInfo: any) => { console.log('Failed:', errorInfo); }; type FieldType = { username?: string; password?: string; remember?: string; }; 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;