1 | import _extends from "@babel/runtime-corejs2/helpers/esm/extends";
|
2 | import _objectWithoutPropertiesLoose from "@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose";
|
3 | import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
|
4 | import classNames from 'classnames';
|
5 | import React from 'react';
|
6 | import PropTypes from 'prop-types';
|
7 | import Media from './Media';
|
8 | import { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';
|
9 | var propTypes = {
|
10 | |
11 |
|
12 |
|
13 | align: PropTypes.oneOf(['top', 'middle', 'bottom'])
|
14 | };
|
15 |
|
16 | var MediaRight =
|
17 |
|
18 | function (_React$Component) {
|
19 | _inheritsLoose(MediaRight, _React$Component);
|
20 |
|
21 | function MediaRight() {
|
22 | return _React$Component.apply(this, arguments) || this;
|
23 | }
|
24 |
|
25 | var _proto = MediaRight.prototype;
|
26 |
|
27 | _proto.render = function render() {
|
28 | var _this$props = this.props,
|
29 | align = _this$props.align,
|
30 | className = _this$props.className,
|
31 | props = _objectWithoutPropertiesLoose(_this$props, ["align", "className"]);
|
32 |
|
33 | var _splitBsProps = splitBsProps(props),
|
34 | bsProps = _splitBsProps[0],
|
35 | elementProps = _splitBsProps[1];
|
36 |
|
37 | var classes = getClassSet(bsProps);
|
38 |
|
39 | if (align) {
|
40 |
|
41 | classes[prefix(Media.defaultProps, align)] = true;
|
42 | }
|
43 |
|
44 | return React.createElement("div", _extends({}, elementProps, {
|
45 | className: classNames(className, classes)
|
46 | }));
|
47 | };
|
48 |
|
49 | return MediaRight;
|
50 | }(React.Component);
|
51 |
|
52 | MediaRight.propTypes = propTypes;
|
53 | export default bsClass('media-right', MediaRight); |
\ | No newline at end of file |