This repository was archived by the owner on Jun 1, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
3
3
import FormControl from '@material-ui/core/FormControl' ;
4
- import Input from '@material-ui/core/Input' ;
5
- import InputLabel from '@material-ui/core/InputLabel' ;
4
+ import TextField from '@material-ui/core/TextField' ;
6
5
7
6
import { WidgetProps } from 'react-jsonschema-form' ;
8
7
@@ -36,9 +35,9 @@ const TextWidget = ({
36
35
//error={!!rawErrors}
37
36
required = { required }
38
37
>
39
- < InputLabel > { label || schema . title } </ InputLabel >
40
- < Input
38
+ < TextField
41
39
id = { id }
40
+ label = { label || schema . title }
42
41
autoFocus = { autofocus }
43
42
required = { required }
44
43
disabled = { disabled || readonly }
Original file line number Diff line number Diff line change @@ -3,8 +3,7 @@ import React from 'react';
3
3
import { WidgetProps } from 'react-jsonschema-form' ;
4
4
5
5
import FormControl from '@material-ui/core/FormControl' ;
6
- import Input from '@material-ui/core/Input' ;
7
- import InputLabel from '@material-ui/core/InputLabel' ;
6
+ import TextField from '@material-ui/core/TextField' ;
8
7
9
8
type CustomWidgetProps = WidgetProps & {
10
9
options : any ;
@@ -41,9 +40,9 @@ const TextareaWidget = ({
41
40
//error={!!rawErrors}
42
41
required = { required }
43
42
>
44
- < InputLabel > { label || schema . title } </ InputLabel >
45
- < Input
43
+ < TextField
46
44
id = { id }
45
+ label = { label || schema . title }
47
46
placeholder = { placeholder }
48
47
disabled = { disabled || readonly }
49
48
value = { value }
You can’t perform that action at this time.
0 commit comments