@atlaskit/form
Version:
A form allows people to input information.
17 lines • 590 B
JavaScript
import { isValidElement } from 'react';
const messageMotionCapability = Symbol.for('@atlaskit/form/message-motion-capable');
const messageMotion = {
mark(component) {
Object.defineProperty(component, messageMotionCapability, {
value: true
});
},
isCapable(child) {
if (! /*#__PURE__*/isValidElement(child)) {
return false;
}
const childType = child.type;
return (typeof childType === 'function' || typeof childType === 'object' && childType !== null) && Reflect.get(childType, messageMotionCapability) === true;
}
};
export default messageMotion;