// Copyright (C) 2020 Intel Corporation // // SPDX-License-Identifier: MIT import React from 'react'; import ReactDOM from 'react-dom'; import { Button, } from 'antd'; interface Props { activatedStateID: number | null; visible: boolean; left: number; top: number; onPointDelete(): void; } export default function CanvasPointContextMenu(props: Props): JSX.Element | null { const { onPointDelete, activatedStateID, visible, left, top, } = props; if (!visible || activatedStateID === null) { return null; } return ReactDOM.createPortal(
, window.document.body, ); }