mirror of
https://github.com/usatiuk/ustk-todolist.git
synced 2025-10-28 23:57:49 +01:00
use material-ui for controls
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { TextField } from '@material-ui/core';
|
||||
|
||||
export default function InputField({
|
||||
required,
|
||||
@@ -9,12 +10,10 @@ export default function InputField({
|
||||
type,
|
||||
}) {
|
||||
return (
|
||||
<div>
|
||||
<label htmlFor={input.name}>
|
||||
{label} <input required={required} {...input} type={type} />
|
||||
</label>
|
||||
<React.Fragment>
|
||||
<TextField label={label} required={required} {...input} type={type} />
|
||||
{touched && error && <span className="error">{error}</span>}
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user