Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { useOnce } from 'shared'
declare const window: {
addEventListener(
name: string,
fn: (event: any) => void,
capture?: boolean
): void
removeEventListener(
name: string,
fn: (event: any) => void,
capture?: boolean
): void
}
const AnimatedView = withAnimated(View)
const ParentContext = React.createContext(null)
function getScrollType(horizontal: boolean) {
return horizontal ? 'scrollLeft' : 'scrollTop'
}
const START_TRANSLATE_3D = 'translate3d(0px,0px,0px)'
const START_TRANSLATE = 'translate(0px,0px)'
interface IParallaxLayer {
setHeight(height: number, immediate?: boolean): void
setPosition(height: number, scrollTop: number, immediate?: boolean): void
}
interface IParallax {
config: ConfigProp