diff --git a/src/LazyHero.js b/src/LazyHero.js index 7696f6c..5e6d5fb 100644 --- a/src/LazyHero.js +++ b/src/LazyHero.js @@ -159,7 +159,13 @@ class LazyHero extends Component { imageHeight={backgroundDimensions && backgroundDimensions.height} imageSrc={this.props.imageSrc} imageWidth={backgroundDimensions && backgroundDimensions.width} - style={{ backgroundPositionY }} + style={{ + backgroundPositionY: ( + this.props.backgroundPositionY + ? this.props.backgroundPositionY + : backgroundPositionY + ), + }} transitionDuration={this.props.transitionDuration} transitionTimingFunction={this.props.transitionTimingFunction} /> @@ -176,6 +182,7 @@ class LazyHero extends Component { } LazyHero.defaultProps = { + backgroundPositionY: undefined, children: undefined, className: undefined, color: '#fff', @@ -191,6 +198,7 @@ LazyHero.defaultProps = { }; LazyHero.propTypes = { + backgroundPositionY: PropTypes.string, children: PropTypes.node, className: PropTypes.string, color: PropTypes.string, diff --git a/website/src/components/App.js b/website/src/components/App.js index 4855843..7343ef3 100644 --- a/website/src/components/App.js +++ b/website/src/components/App.js @@ -15,6 +15,7 @@ function App(props) { return (
', description: 'Child components',