mirror of
https://github.com/kucherenko/jscpd.git
synced 2026-09-19 08:11:03 +08:00
34 lines
864 B
React
34 lines
864 B
React
import classNames from 'classnames';
|
|
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
import Media from './Media';
|
|
import { bsClass, getClassSet, prefix, splitBsProps }
|
|
from './utils/bootstrapUtils';
|
|
|
|
const propTypes = {
|
|
/**
|
|
* Align the media to the top, middle, or bottom of the media object.
|
|
*/
|
|
align: PropTypes.oneOf(['top', 'middle', 'bottom']),
|
|
};
|
|
|
|
class MediaRight extends React.Component {
|
|
render() {
|
|
const { align, className, ...props } = this.props;
|
|
const [bsProps, elementProps] = splitBsProps(props);
|
|
|
|
const classes = getClassSet(bsProps);
|
|
|
|
return (
|
|
<div
|
|
{...elementProps}
|
|
className={classNames(className, classes)}
|
|
/>
|
|
);
|
|
}
|
|
}
|
|
|
|
MediaRight.propTypes = propTypes;
|
|
|
|
export default bsClass('media-right', MediaRight); |