is-motion-component.mjs 306 B

123456789101112
  1. import { motionComponentSymbol } from './symbol.mjs';
  2. /**
  3. * Checks if a component is a `motion` component.
  4. */
  5. function isMotionComponent(component) {
  6. return (component !== null &&
  7. typeof component === "object" &&
  8. motionComponentSymbol in component);
  9. }
  10. export { isMotionComponent };