@opensig/opendesign
Version:
20 lines (19 loc) • 354 B
JavaScript
function useElementDirective(onElementChange) {
const directive = {
mounted(el) {
onElementChange(el, "mounted");
},
updated(el) {
onElementChange(el, "updated");
},
unmounted() {
onElementChange(null, "unmounted");
}
};
return {
getElementDirective: directive
};
}
export {
useElementDirective
};