UNPKG

@talend/react-bootstrap

Version:

Bootstrap 3 components built with React

35 lines 1.03 kB
import classNames from 'classnames'; import React from 'react'; import PropTypes from 'prop-types'; import { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils'; import { jsx as _jsx } from "react/jsx-runtime"; const propTypes = { /** * Align the media to the top, middle, or bottom of the media object. */ align: PropTypes.oneOf(['top', 'middle', 'bottom']) }; class MediaLeft extends React.Component { render() { const { align, className, ...props } = this.props; const [bsProps, elementProps] = splitBsProps(props); const classes = getClassSet(bsProps); if (align) { // The class is e.g. `media-top`, not `media-left-top`. classes[prefix({ bsClass: 'media' }, align)] = true; } return /*#__PURE__*/_jsx("div", { ...elementProps, className: classNames(className, classes) }); } } MediaLeft.propTypes = propTypes; export default bsClass('media-left', MediaLeft); //# sourceMappingURL=MediaLeft.js.map