(function (global, factory) {
  if (typeof define === "function" && define.amd) {
    define(['exports', 'react', 'classnames', './px-data-table.scss'], factory);
  } else if (typeof exports !== "undefined") {
    factory(exports, require('react'), require('classnames'), require('./px-data-table.scss'));
  } else {
    var mod = {
      exports: {}
    };
    factory(mod.exports, global.react, global.classnames, global.pxDataTable);
    global.index = mod.exports;
  }
})(this, function (exports, _react, _classnames, _pxDataTable) {
  'use strict';

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

  var _react2 = _interopRequireDefault(_react);

  var _classnames2 = _interopRequireDefault(_classnames);

  var _pxDataTable2 = _interopRequireDefault(_pxDataTable);

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

  exports.default = function (_ref) {
    var _ref$label = _ref.label,
        label = _ref$label === undefined ? 'DataTable' : _ref$label,
        children = _ref.children;

    var baseClasses = (0, _classnames2.default)('px-data-table', {
      'px-datatable--children': children
    });

    return _react2.default.createElement(
      'div',
      { className: baseClasses },
      _react2.default.createElement(
        'h4',
        null,
        label
      ),
      _react2.default.createElement(
        'div',
        null,
        children
      ),
      _react2.default.createElement(
        'style',
        { jsx: true },
        _pxDataTable2.default
      )
    );
  };
});