import * as React from "react" ; import { ContextMenuTarget , IProps } from "@blueprintjs/core" ; export interface IContextMenuTargetWrapper extends IProps { renderContextMenu : ( e : React . MouseEvent < HTMLElement > ) => JSX . Element ; style : React . CSSProperties ; } /**
 * Since the ContextMenuTarget uses the `onContextMenu` prop instead
 * `element.addEventListener`, the prop can be lost. This wrapper helps us
 * maintain context menu fuctionality when doing fancy React.cloneElement
 * chains.
 */ @ ContextMenuTarget export class ContextMenuTargetWrapper extends React . PureComponent < IContextMenuTargetWrapper > { public render ( ) { const { className , children , style } = this . props ; return ( < div className = { className } style = { style } > { children } < /div>); } public renderContextMenu ( e ) { return this . props . renderContextMenu ( e ) ; } }