securityos/node_modules/framer-motion/dist/es/render/dom/utils/create-config.mjs

20 lines
669 B
JavaScript
Raw Permalink Normal View History

2024-09-06 15:32:35 +00:00
import { isSVGComponent } from './is-svg-component.mjs';
import { createUseRender } from '../use-render.mjs';
import { svgMotionConfig } from '../../svg/config-motion.mjs';
import { htmlMotionConfig } from '../../html/config-motion.mjs';
function createDomMotionConfig(Component, { forwardMotionProps = false }, preloadedFeatures, createVisualElement) {
const baseConfig = isSVGComponent(Component)
? svgMotionConfig
: htmlMotionConfig;
return {
...baseConfig,
preloadedFeatures,
useRender: createUseRender(forwardMotionProps),
createVisualElement,
Component,
};
}
export { createDomMotionConfig };