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