@6thquake/react-material
Version:
React components that implement Google's Material Design.
39 lines (36 loc) • 719 B
JavaScript
import React, { Component } from 'react';
import TextField from '../TextField';
import withStyles from '../styles/withStyles';
/**
* @ignore - internal component.
*/
const styles = theme => ({
root: {
width: '100%'
},
input: {
padding: '10px',
minWidth: '200px'
}
});
function AsyncSelectFilter(props) {
const {
text,
placeholder,
onChange,
classes
} = props;
return React.createElement(TextField, {
autoFocus: true,
value: text,
placeholder: placeholder,
onChange: onChange,
className: classes.root,
inputProps: {
className: classes.input
}
});
}
export default withStyles(styles, {
name: 'RMAsyncSelectFilter'
})(AsyncSelectFilter);