(props)
| 17 | }; |
| 18 | |
| 19 | function CardImg(props) { |
| 20 | const { |
| 21 | className, |
| 22 | cssModule, |
| 23 | top, |
| 24 | bottom, |
| 25 | tag: Tag = 'img', |
| 26 | ...attributes |
| 27 | } = props; |
| 28 | |
| 29 | let cardImgClassName = 'card-img'; |
| 30 | if (top) { |
| 31 | cardImgClassName = 'card-img-top'; |
| 32 | } |
| 33 | if (bottom) { |
| 34 | cardImgClassName = 'card-img-bottom'; |
| 35 | } |
| 36 | |
| 37 | const classes = mapToCssModules( |
| 38 | classNames(className, cardImgClassName), |
| 39 | cssModule, |
| 40 | ); |
| 41 | |
| 42 | return <Tag {...attributes} className={classes} />; |
| 43 | } |
| 44 | |
| 45 | CardImg.propTypes = propTypes; |
| 46 |
nothing calls this directly
no test coverage detected
searching dependent graphs…