motion-v
Version:
<p align="center"> <img width="100" height="100" alt="Motion logo" src="https://user-images.githubusercontent.com/7850794/164965523-3eced4c4-6020-467e-acde-f11b7900ad62.png" /> </p> <h1 align="center">Motion for Vue</h1>
18 lines (17 loc) • 359 B
JavaScript
import { unrefElement } from "@vueuse/core";
import "vue";
function getMotionElement(el) {
if (!el)
return void 0;
if (el.nodeType === 3 || el.nodeType === 8) {
return getMotionElement(el.nextSibling);
}
return el;
}
function getElement(target) {
return getMotionElement(unrefElement(target));
}
export {
getElement,
getMotionElement
};