Skip to content

Commit

Permalink
Merge pull request #423 from appearhere/feature/destination-image-props
Browse files Browse the repository at this point in the history
Spread props from DestinationListingCard to Carousel images
  • Loading branch information
mic-css committed Jul 12, 2018
2 parents 2c1c639 + f22244c commit b33b62d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
padding-bottom: 0;
}

.image {
.imageContainer > img {
position: absolute;
top: 0;
bottom: 0;
Expand All @@ -120,6 +120,7 @@
border-radius: 4px 4px 0 0;
display: block;
background-color: var(--color-greyLighter);
min-width: 100%;
}

.body {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';

import noop from '../../../utils/noop';
Expand Down Expand Up @@ -132,10 +132,10 @@ export default class DestinationListingCard extends Component {
dragging={false}
onChange={onCarouselChange}
>
{images.map(({ src, alt }) => (
{images.map(({ src, ...imageProps }) => (
<a href={href} key={src} onClick={this.onClick}>
<div className={css.imageContainer}>
<FittedImage className={css.image} src={src} alt={alt} />
<FittedImage className={css.image} src={src} {...imageProps} />
</div>
</a>
))}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@appearhere/bloom",
"version": "1.0.1-2",
"version": "1.0.1-3",
"description": "Appear Here's pattern library and styleguide",
"licence": "MIT",
"keywords": [
Expand Down

0 comments on commit b33b62d

Please sign in to comment.