Export optional animated boolean

This commit is contained in:
Matthias Metelka 2022-09-09 20:01:27 +02:00
parent 563ed8a9ab
commit a73ae72e75

View file

@ -9,12 +9,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
export let collapse = false;
export let duration = 200;
export let animated = !document.body.classList.contains("reduced-motion");
let collapsed = false;
let contentHeight = 0;
let animated = !document.body.classList.contains("reduced-motion");
function dynamicDuration(height: number): number {
return 100 + Math.pow(height, 1 / 4) * 25;
}