File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { useState } from "react" ;
2
2
import Form from "antd/es/form" ;
3
3
import theme from "antd/es/theme" ;
4
+ import Input from "antd/es/input" ;
4
5
import Button from "antd/es/button" ;
5
6
import Card from "antd/es/card/Card" ;
6
7
import FormItem from "antd/es/form/FormItem" ;
@@ -47,6 +48,9 @@ const AntDemo = () => {
47
48
< FormItem name = "phone" rules = { [ { validator} ] } >
48
49
< PhoneInput enableSearch onChange = { ( e ) => setValue ( e as any ) } />
49
50
</ FormItem >
51
+ < FormItem name = "test" >
52
+ < Input />
53
+ </ FormItem >
50
54
< div style = { { display : "flex" , gap : 24 } } >
51
55
< Button htmlType = "reset" > Reset Value</ Button >
52
56
< Button onClick = { changeTheme } > Change Theme</ Button >
Original file line number Diff line number Diff line change 1
1
import { useCallback , useMemo , useState } from "react" ;
2
2
import { createTheme , ThemeProvider } from "@mui/material/styles" ;
3
- import { Button , Container , CssBaseline } from "@mui/material" ;
3
+ import { Button , Container , CssBaseline , TextField } from "@mui/material" ;
4
4
5
- import CustomInput from "./mui-phone" ;
5
+ import PhoneInput from "./mui-phone" ;
6
6
7
7
const Demo = ( ) => {
8
8
const [ value , setValue ] = useState ( { } ) ;
@@ -29,13 +29,14 @@ const Demo = () => {
29
29
</ pre >
30
30
) }
31
31
< form noValidate autoComplete = "off" onSubmit = { e => e . preventDefault ( ) } >
32
- < CustomInput
32
+ < PhoneInput
33
33
enableSearch
34
34
error = { error }
35
35
variant = "filled"
36
36
searchVariant = "standard"
37
37
onChange = { ( e ) => setValue ( e as any ) }
38
38
/>
39
+ < TextField variant = "filled" style = { { marginTop : "1.5rem" } } />
39
40
< div style = { { display : "flex" , gap : 24 , marginTop : "1rem" } } >
40
41
< Button type = "reset" > Reset Value</ Button >
41
42
< Button onClick = { handleThemeChange } > Change Theme</ Button >
You can’t perform that action at this time.
0 commit comments