1
0
mirror of https://github.com/flarum/core.git synced 2025-10-27 05:31:29 +01:00
Files
php-flarum/js/dist-typings/forum/utils/slidable.d.ts
flarum-bot 3d62a6af27 Bundled output for commit d268894e61
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2021-12-27 19:02:33 +00:00

18 lines
665 B
TypeScript

/**
* The `slidable` utility adds touch gestures to an element so that it can be
* slid away to reveal controls underneath, and then released to activate those
* controls.
*
* It relies on the element having children with particular CSS classes.
*
* The function returns a record with a `reset` proeprty. This is a function
* which reverts the slider to its original position. This should be called,
* for example, when a controls dropdown is closed.
*
* @param {HTMLElement | SVGElement | Element} element
* @return {{ reset : () => void }}
*/
export default function slidable(element: HTMLElement | SVGElement | Element): {
reset: () => void;
};