/** * @file Context menu customization section. */ import * as React from "react"; import classes from "./InteractionCustomizationExample.module.css"; type ContextMenuSettingsSectionProps = { mode: "default" | "custom"; onModeChange: (mode: "default" | "custom") => void; log: string[]; onClearLog: () => void; }; export const ContextMenuSettingsSection: React.FC = ({ mode, onModeChange, log, onClearLog, }) => { return (
Context Menu Handling

Inject a custom handler to observe context menu requests before falling back to the built-in menu.

{mode === "custom" && (
Recent requests (most recent first)
{log.length === 0 ? (
Interact with the canvas to see intercepted requests.
) : (
{log.map((entry, index) => (
{entry}
))}
)}
)}
); };