import autoAnimate_ from "@formkit/auto-animate"; import { onMount } from "solid-js"; // https://auto-animate.formkit.com/ export const autoAnimate = ( el: HTMLElement, config?: () => Parameters[1] ) => { onMount(function () { autoAnimate_(el, config != null ? config() : undefined); }); }; declare module "solid-js" { namespace JSX { interface Directives { autoAnimate: Parameters[1] | boolean; } } }