react-grid-gallery
Advanced tools
Comparing version 0.4.3 to 0.4.4
# react-grid-gallery | ||
### v0.4.4 / 2017-09-29 | ||
* Added optional thumbnailCaption functionality [PR 42](https://github.com/benhowell/react-grid-gallery/pull/42). Thanks [jakub-tucek](https://github.com/jakub-tucek). | ||
* Updated acknowledgements. | ||
* Updated documentation. | ||
### v0.4.3 / 2017-09-15 | ||
@@ -4,0 +13,0 @@ |
@@ -78,3 +78,4 @@ 'use strict'; | ||
'./examples/demo3.js', | ||
'./examples/demo4.js'], { | ||
'./examples/demo4.js', | ||
'./examples/demo5.js'], { | ||
extensions: ['.js', '.jsx'] | ||
@@ -81,0 +82,0 @@ }) |
@@ -349,3 +349,4 @@ 'use strict'; | ||
thumbnailHeight: _propTypes2.default.number.isRequired, | ||
isSelected: _propTypes2.default.bool | ||
isSelected: _propTypes2.default.bool, | ||
thumbnailCaption: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.element]) | ||
})).isRequired, | ||
@@ -352,0 +353,0 @@ id: _propTypes2.default.string, |
@@ -226,2 +226,13 @@ 'use strict'; | ||
style: this.thumbnailStyle() }) | ||
), | ||
this.props.item.thumbnailCaption && _react2.default.createElement( | ||
'div', | ||
{ className: 'tile-description', | ||
style: { | ||
background: "white", | ||
height: "100%", | ||
width: "100%", | ||
margin: 0 | ||
} }, | ||
this.props.item.thumbnailCaption | ||
) | ||
@@ -228,0 +239,0 @@ ); |
{ | ||
"name": "react-grid-gallery", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"description": "Justified gallery component for React.", | ||
"main": "lib/Gallery.js", | ||
"dependencies": { | ||
"react-images": "^0.5.4" | ||
"react-images": "^0.5.6" | ||
}, | ||
@@ -9,0 +9,0 @@ "devDependencies": { |
@@ -71,2 +71,3 @@ # React Grid Gallery | ||
customOverlay | element | undefined | Optional. A custom element to be rendered as a thumbnail overlay on hover. | ||
thumbnailCaption | string|element| undefined | Optional. A thumbnail caption shown below thumbnail. | ||
@@ -177,3 +178,5 @@ ## Gallery Options | ||
* [jakub-tucek](https://github.com/jakub-tucek) for thumbnailCaption functionality [PR 42](https://github.com/benhowell/react-grid-gallery/pull/42) | ||
@@ -180,0 +183,0 @@ |
@@ -307,3 +307,7 @@ import PropTypes from 'prop-types'; | ||
thumbnailHeight: PropTypes.number.isRequired, | ||
isSelected: PropTypes.bool | ||
isSelected: PropTypes.bool, | ||
thumbnailCaption: PropTypes.oneOfType([ | ||
PropTypes.string, | ||
PropTypes.element | ||
]) | ||
}) | ||
@@ -310,0 +314,0 @@ ).isRequired, |
@@ -182,3 +182,3 @@ import PropTypes from 'prop-types'; | ||
style={this.tileViewportStyle()} | ||
key={"tile-viewport-"+this.props.index} | ||
key={"tile-viewport-"+this.props.index} | ||
onClick={this.props.onClick ? | ||
@@ -191,3 +191,14 @@ (e) => this.props.onClick.call(this, this.props.index, e) : null}> | ||
</div> | ||
</div> | ||
{this.props.item.thumbnailCaption && ( | ||
<div className="tile-description" | ||
style={{ | ||
background: "white", | ||
height: "100%", | ||
width: "100%", | ||
margin: 0 | ||
}}> | ||
{this.props.item.thumbnailCaption} | ||
</div> | ||
)} | ||
</div> | ||
); | ||
@@ -194,0 +205,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
422617
23
4009
191
Updatedreact-images@^0.5.6