UNPKG

@gechiui/components

Version:
32 lines (27 loc) 924 B
import _extends from "@babel/runtime/helpers/esm/extends"; import { createElement } from "@gechiui/element"; /** * GeChiUI dependencies */ import { forwardRef } from '@gechiui/element'; import deprecated from '@gechiui/deprecated'; function stopPropagation(event) { event.stopPropagation(); } export default forwardRef((_ref, ref) => { let { children, ...props } = _ref; deprecated('gc.components.IsolatedEventContainer', { since: '5.7' }); // Disable reason: this stops certain events from propagating outside of the component. // - onMouseDown is disabled as this can cause interactions with other DOM elements /* eslint-disable jsx-a11y/no-static-element-interactions */ return createElement("div", _extends({}, props, { ref: ref, onMouseDown: stopPropagation }), children); /* eslint-enable jsx-a11y/no-static-element-interactions */ }); //# sourceMappingURL=index.js.map