UNPKG

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

25 lines (24 loc) 725 B
import { IMargin } from './types/types'; interface IGenericZoom { outerElem: HTMLElement; elemToZoom: HTMLElement; activeZIndex?: number; elemToZoomWrapper: HTMLElement; zoomMargin?: IMargin; transitionDuration?: number; } declare class GenericZoom { private transitionDuration; private activeZIndex; private outerElem; private elemToZoom; private elemToZoomWrapper; private zoomMargin; private isZoomed; constructor({ transitionDuration, outerElem, elemToZoom, elemToZoomWrapper, activeZIndex, zoomMargin, }: IGenericZoom); private applyZoom; private onTransitionEnd; zoom(): void; unZoom(): void; } export default GenericZoom;