@plan-three/material-ui-autosuggest
Version:
A fuzzy search autosuggest component for Material-UI
25 lines (22 loc) • 533 B
JavaScript
import React from 'react'
import TextField from 'material-ui/TextField'
export default function renderInput(props) {
const { classes, ref, inputLabelProps, label, fullWidth, helperText, error, ...otherProps } = props
return (
<TextField
fullWidth={fullWidth}
inputRef={ref}
InputProps={{
classes: {
input: classes.input
},
error: error,
...otherProps
}}
helperText={helperText}
InputLabelProps={{ ...inputLabelProps, error }}
FormHelperTextProps={{ error }}
label={label}
/>
)
}