'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

var _propTypes2 = _interopRequireDefault(_propTypes);

var _reactRouterDom = require('react-router-dom');

var _NavLink = require('../../../styles/cspace-ui/NavLink.css');

var _NavLink2 = _interopRequireDefault(_NavLink);

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

function NavLink(props) {
  const to = props.to,
        children = props.children;


  return _react2.default.createElement(
    _reactRouterDom.NavLink,
    {
      to: to,
      className: _NavLink2.default.normal,
      activeClassName: _NavLink2.default.active
    },
    _react2.default.createElement(
      'div',
      null,
      children
    )
  );
}

NavLink.propTypes = {
  to: _propTypes2.default.string.isRequired,
  children: _propTypes2.default.node
};