'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

var _styledComponents = require('styled-components');

var _styledComponents2 = _interopRequireDefault(_styledComponents);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

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; }

var Wrapper = _styledComponents2.default.div.withConfig({
  displayName: 'TableCell__Wrapper'
})(['flex-basis:', ';display:flex;flex-direction:row;box-sizing:border-box;@media(max-width:480px){flex-basis:', ';display:', ';}'], function (props) {
  return props.width;
}, function (props) {
  return props.mobileWidth;
}, function (props) {
  return props.hideMobile ? 'none' : 'flex';
});

var TableCell = function TableCell(_ref) {
  var children = _ref.children,
      rest = _objectWithoutProperties(_ref, ['children']);

  return _react2.default.createElement(
    Wrapper,
    rest,
    children
  );
};

TableCell.propTypes = {
  width: _propTypes2.default.string
};

TableCell.defaultProps = {
  width: '100%'
};

exports.default = TableCell;