"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _propTypes = _interopRequireDefault(require("prop-types"));

var _react = _interopRequireDefault(require("react"));

var _Icon = _interopRequireDefault(require("../Icon/Icon"));

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

var hashToGoToTop = "#site-header";
var styles = {
  display: "flex",
  flexDirection: "column",
  textAlign: "center"
};

var ScrollToTop = function ScrollToTop(_ref) {
  var _ref$iconStyle = _ref.iconStyle,
      iconStyle = _ref$iconStyle === void 0 ? null : _ref$iconStyle;
  return _react["default"].createElement("div", null, _react["default"].createElement("a", {
    style: styles,
    href: hashToGoToTop
  }, iconStyle && _react["default"].createElement(_Icon["default"], {
    className: iconStyle
  }), _react["default"].createElement("span", null, "Back to Top")));
};

ScrollToTop.displayName = "ScrollToTop";
ScrollToTop.propTypes = {
  iconStyle: _propTypes["default"].string
};
var _default = ScrollToTop;
exports["default"] = _default;