UNPKG

svelte-motion

Version:

Svelte animation library based on the React library framer-motion.

17 lines (15 loc) 478 B
/** based on framer-motion@4.0.3, Copyright (c) 2018 Framer B.V. */ function renderHTML(element, _a) { var style = _a.style, vars = _a.vars; // Directly assign style into the Element's style prop. In tests Object.assign is the // fastest way to assign styles. Object.assign(element.style, style); // Loop over any CSS variables and assign those. for (var key in vars) { element.style.setProperty(key, vars[key]); } } export { renderHTML };