generic-zoom
Version:
Medium zoom like functionality, but working by simply transforming the element. Suited for children that adjust automatically depending on the parent element width - such as gatsby-image. (Note that for use with react, use the generic-medium-zoom-react p
20 lines (19 loc) • 549 B
TypeScript
interface IZoomOverlay {
outerElem: HTMLElement;
overlayElem: HTMLElement;
activeZIndex?: number;
transitionDuration?: number;
backgroundColor?: string;
}
declare class ZoomOverlay {
private zoomOverlay;
private outerElem;
private activeZIndex;
private isZoomed;
constructor({ outerElem, overlayElem, transitionDuration, backgroundColor, activeZIndex, }: IZoomOverlay);
private onTransitionEnd;
private applyZoom;
zoom(): void;
unZoom(): void;
}
export default ZoomOverlay;