-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
/
Inputs.js
32 lines (28 loc) · 911 Bytes
/
Inputs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import Input from '@material-ui/core/Input';
const styles = theme => ({
container: {
display: 'flex',
flexWrap: 'wrap',
},
input: {
margin: theme.spacing(1),
},
});
function Inputs(props) {
const { classes } = props;
return (
<div className={classes.container}>
<Input defaultValue="Hello world" className={classes.input} aria-label="Description" />
<Input placeholder="Placeholder" className={classes.input} aria-label="Description" />
<Input value="Disabled" className={classes.input} disabled aria-label="Description" />
<Input defaultValue="Error" className={classes.input} error aria-label="Description" />
</div>
);
}
Inputs.propTypes = {
classes: PropTypes.object.isRequired,
};
export default withStyles(styles)(Inputs);