UNPKG

preact-context-menu

Version:
24 lines 931 B
var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; import { h } from "preact"; import { useTriggerEvents } from "./util"; /** * Component which wraps around other components to provide a context menu trigger area. * @param props Trigger props * @returns Component */ var ContextMenuTrigger = function (_a) { var id = _a.id, data = _a.data, children = _a.children, disabled = _a.disabled, touchTimeout = _a.touchTimeout; return h("span", __assign({}, useTriggerEvents(id, data, disabled, touchTimeout)), children); }; export default ContextMenuTrigger; //# sourceMappingURL=trigger.js.map