芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/app.optimyar.com/backend/node_modules/reactstrap/src/CardImg.js
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { mapToCssModules, tagPropType } from './utils'; const propTypes = { tag: tagPropType, top: PropTypes.bool, bottom: PropTypes.bool, className: PropTypes.string, cssModule: PropTypes.object, }; const defaultProps = { tag: 'img' }; const CardImg = (props) => { const { className, cssModule, top, bottom, tag: Tag, ...attributes } = props; let cardImgClassName = 'card-img'; if (top) { cardImgClassName = 'card-img-top'; } if (bottom) { cardImgClassName = 'card-img-bottom'; } const classes = mapToCssModules(classNames( className, cardImgClassName ), cssModule); return (
); }; CardImg.propTypes = propTypes; CardImg.defaultProps = defaultProps; export default CardImg;