UNPKG

alpinejs-flux

Version:

Simplifies the process of applying CSS classes with x-transition as a template and makes them reusable within single attribute.

7 lines (6 loc) 252 B
import applyTransitions from "./applyTransitions"; export default function (Alpine, validName, templateName, template = null) { Alpine.magic( validName, ( element ) => () => { applyTransitions( element, templateName, template ); } ); }