@abbl/material-calendar
Version:
Calendar component build with React and Material-UI
18 lines (17 loc) • 528 B
TypeScript
import React from 'react';
export declare enum ScrollEvent {
UP = 0,
DOWN = 1
}
export interface UseScrollLockProps {
lockDuration: number;
onScrollEvent: (event: ScrollEvent) => void;
}
/**
* Hook which locks the scroll and sends callback with scroll move direction.
*
* Returns a method that accepts WheelEvent as parameter
* and handles all the logic behind the hook.
* @param props
*/
export default function useScrollLock(props: UseScrollLockProps): (event: React.WheelEvent<HTMLDivElement>) => void;