Skip to content

Commit 96627ec

Browse files
committed
Add ordinary inputs for comparison
1 parent 6616344 commit 96627ec

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

development/src/AntDemo.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {useState} from "react";
22
import Form from "antd/es/form";
33
import theme from "antd/es/theme";
4+
import Input from "antd/es/input";
45
import Button from "antd/es/button";
56
import Card from "antd/es/card/Card";
67
import FormItem from "antd/es/form/FormItem";
@@ -47,6 +48,9 @@ const AntDemo = () => {
4748
<FormItem name="phone" rules={[{validator}]}>
4849
<PhoneInput enableSearch onChange={(e) => setValue(e as any)}/>
4950
</FormItem>
51+
<FormItem name="test">
52+
<Input/>
53+
</FormItem>
5054
<div style={{display: "flex", gap: 24}}>
5155
<Button htmlType="reset">Reset Value</Button>
5256
<Button onClick={changeTheme}>Change Theme</Button>

development/src/MuiDemo.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {useCallback, useMemo, useState} from "react";
22
import {createTheme, ThemeProvider} from "@mui/material/styles";
3-
import {Button, Container, CssBaseline} from "@mui/material";
3+
import {Button, Container, CssBaseline, TextField} from "@mui/material";
44

5-
import CustomInput from "./mui-phone";
5+
import PhoneInput from "./mui-phone";
66

77
const Demo = () => {
88
const [value, setValue] = useState({});
@@ -29,13 +29,14 @@ const Demo = () => {
2929
</pre>
3030
)}
3131
<form noValidate autoComplete="off" onSubmit={e => e.preventDefault()}>
32-
<CustomInput
32+
<PhoneInput
3333
enableSearch
3434
error={error}
3535
variant="filled"
3636
searchVariant="standard"
3737
onChange={(e) => setValue(e as any)}
3838
/>
39+
<TextField variant="filled" style={{marginTop: "1.5rem"}}/>
3940
<div style={{display: "flex", gap: 24, marginTop: "1rem"}}>
4041
<Button type="reset">Reset Value</Button>
4142
<Button onClick={handleThemeChange}>Change Theme</Button>

0 commit comments

Comments
 (0)