Closed biplav11 closed 7 years ago
Do you want to initialize ReactImageZoom with something like this ?
import React, { Component } from 'react';
import ReactImageZoom from 'react-image-zoom';
import image from './header-ships-general.jpg';
const props = {width: 400, , height: 'auto' zoomWidth: 500, img: image};
class App extends Component {
render() {
return <ReactImageZoom {...props } />;
}
}
yes and define height and width in percentage as well
height: 'auto' feature requires changes in dependency package js-image-zoom. I will implement height: 'auto' feature within next release of js-image-zoom.
Regarding width/height values as percentage: No plans to implement this so far.
auto height is implemented in 0.6.0 (if height prop is omitted, browser calculated height is used)
Hi @malaman, percentages units implemented for height and width ?
hi, no only px
.
For a zoomed image scale
param could be used.
changed static propTypes of height to auto still give the passed height