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