@crossfield/react-read-more
Advanced tools
Comparing version 0.1.1 to 0.2.0
@@ -78,3 +78,4 @@ 'use strict'; | ||
readMore = _props.readMore, | ||
blurStyle = _props.blurStyle; | ||
blurStyle = _props.blurStyle, | ||
overhangSize = _props.overhangSize; | ||
var _state2 = this.state, | ||
@@ -93,4 +94,5 @@ maxHeight = _state2.maxHeight, | ||
{ | ||
className: 'readmore container', | ||
style: { | ||
maxHeight: open ? maxHeight : maxHeight - 160, | ||
maxHeight: open ? maxHeight : maxHeight - overhangSize, | ||
transition: 'max-height .5s ease', | ||
@@ -106,2 +108,3 @@ position: 'relative', | ||
hideReadMore ? null : _react2.default.createElement('div', { | ||
className: 'readmore overhang', | ||
style: Object.assign({ | ||
@@ -112,3 +115,3 @@ transition: 'opacity 0.25s', | ||
content: '', | ||
height: '160px', | ||
height: overhangSize + 'px', | ||
width: '100%', | ||
@@ -134,2 +137,6 @@ position: 'absolute', | ||
ReadMore.defaultProps = { | ||
overhangSize: 160 | ||
}; | ||
exports.default = ReadMore; |
{ | ||
"name": "@crossfield/react-read-more", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "Read more container that expands html elements to their full height", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
6711
112