1 | import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
|
2 | import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
|
3 | import PropTypes from 'prop-types';
|
4 | import React from 'react';
|
5 | import cn from 'classnames';
|
6 | import { prefix, bsClass, splitBsProps } from './utils/bootstrapUtils';
|
7 | var contextTypes = {
|
8 | $bs_panel: PropTypes.shape({
|
9 | bsClass: PropTypes.string
|
10 | })
|
11 | };
|
12 |
|
13 | var PanelFooter =
|
14 |
|
15 | function (_React$Component) {
|
16 | _inheritsLoose(PanelFooter, _React$Component);
|
17 |
|
18 | function PanelFooter() {
|
19 | return _React$Component.apply(this, arguments) || this;
|
20 | }
|
21 |
|
22 | var _proto = PanelFooter.prototype;
|
23 |
|
24 | _proto.render = function render() {
|
25 | var _this$props = this.props,
|
26 | children = _this$props.children,
|
27 | className = _this$props.className;
|
28 |
|
29 | var _ref = this.context.$bs_panel || {},
|
30 | _bsClass = _ref.bsClass;
|
31 |
|
32 | var _splitBsProps = splitBsProps(this.props),
|
33 | bsProps = _splitBsProps[0],
|
34 | elementProps = _splitBsProps[1];
|
35 |
|
36 | bsProps.bsClass = _bsClass || bsProps.bsClass;
|
37 | return React.createElement("div", _extends({}, elementProps, {
|
38 | className: cn(className, prefix(bsProps, 'footer'))
|
39 | }), children);
|
40 | };
|
41 |
|
42 | return PanelFooter;
|
43 | }(React.Component);
|
44 |
|
45 | PanelFooter.contextTypes = contextTypes;
|
46 | export default bsClass('panel', PanelFooter); |
\ | No newline at end of file |