File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const Example = (props) => {
1010 < CardTitle > Card title</ CardTitle >
1111 < CardSubtitle > Card subtitle</ CardSubtitle >
1212 </ CardBlock >
13- < CardImg top width = "100%" src = "https://placeholdit.imgix.net/~text?txtsize=33& txt = 318 % C3 % 97180 & w = 318 & h = 180 " alt = "Card image cap" />
13+ < img width = "100%" src = "https://placeholdit.imgix.net/~text?txtsize=33& txt = 318 % C3 % 97180 & w = 318 & h = 180 " alt = "Card image cap" />
1414 < CardBlock >
1515 < CardText > Some quick example text to build on the card title and make up the bulk of the card's content.</ CardText >
1616 < CardLink href = "#" > Card Link</ CardLink >
Original file line number Diff line number Diff line change @@ -20,11 +20,18 @@ const CardImg = (props) => {
2020 tag : Tag ,
2121 ...attributes
2222 } = props ;
23+
24+ let cardImgClassName = 'card-img' ;
25+ if ( top ) {
26+ cardImgClassName = 'card-img-top' ;
27+ }
28+ if ( bottom ) {
29+ cardImgClassName = 'card-img-bottom' ;
30+ }
31+
2332 const classes = classNames (
2433 className ,
25- 'card-img' ,
26- top ? 'card-img-top' : false ,
27- bottom ? 'card-img-bottom' : false
34+ cardImgClassName
2835 ) ;
2936
3037 return (
You can’t perform that action at this time.
0 commit comments