You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.2 KiB
33 lines
1.2 KiB
import './index.less';
|
|
import React from 'react';
|
|
import classNames from 'classnames';
|
|
export default (function (_ref) {
|
|
var className = _ref.className,
|
|
_ref$prefixCls = _ref.prefixCls,
|
|
prefixCls = _ref$prefixCls === void 0 ? 'ant-pro' : _ref$prefixCls,
|
|
links = _ref.links,
|
|
copyright = _ref.copyright,
|
|
style = _ref.style;
|
|
|
|
if ((links == null || links === false || Array.isArray(links) && links.length === 0) && (copyright == null || copyright === false)) {
|
|
return null;
|
|
}
|
|
|
|
var baseClassName = "".concat(prefixCls, "-global-footer");
|
|
var clsString = classNames(baseClassName, className);
|
|
return /*#__PURE__*/React.createElement("footer", {
|
|
className: clsString,
|
|
style: style
|
|
}, links && /*#__PURE__*/React.createElement("div", {
|
|
className: "".concat(baseClassName, "-links")
|
|
}, links.map(function (link) {
|
|
return /*#__PURE__*/React.createElement("a", {
|
|
key: link.key,
|
|
title: link.key,
|
|
target: link.blankTarget ? '_blank' : '_self',
|
|
href: link.href
|
|
}, link.title);
|
|
})), copyright && /*#__PURE__*/React.createElement("div", {
|
|
className: "".concat(baseClassName, "-copyright")
|
|
}, copyright));
|
|
}); |