var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

import React from 'react';
import { TextInput } from 'grommet/es6/components/TextInput';


export default (function (_ref) {
  var filter = _ref.filter,
      _onChange = _ref.onChange,
      column = _ref.column,
      rest = _objectWithoutProperties(_ref, ['filter', 'onChange', 'column']);

  var props = _extends({ size: 'medium' }, rest);
  return React.createElement(TextInput, _extends({
    'aria-label': 'Filter data by ' + (typeof column.Header === 'string' ? column.Header : column.id),
    value: filter ? filter.value : '',
    onChange: function onChange(event) {
      return _onChange(event.target.value);
    }
  }, props));
});