UNPKG

lucid-ui

Version:

A UI component library from AppNexus.

40 lines (39 loc) 1.06 kB
import React from 'react'; import createClass from 'create-react-class'; import { SearchField } from '../../../index'; export default createClass({ getInitialState: function getInitialState() { return { value: '' }; }, render: function render() { var _this = this; return /*#__PURE__*/React.createElement(SearchField, { placeholder: "icon doesn't become active until you type at least three characters ----->", isValid: this.state.value.length > 2, value: this.state.value, onSubmit: function onSubmit(submission) { return _this.setState({ submission: submission }); }, onChange: function onChange(value) { return _this.setState({ value: value }); }, onKeyDown: function onKeyDown(_ref) { var key = _ref.key; return _this.setState({ key: key }); }, onBlur: function onBlur(lastValue) { return _this.setState({ lastValue: lastValue }); } }); } });