importtype{ ReactElement }from"react";import{ TextArea }from"@react-md/form";import{
ContentCopySVGIcon,
ContentCutSVGIcon,
ContentPasteSVGIcon,}from"@react-md/material-icons";import{ Menu, MenuItem, useContextMenu }from"@react-md/menu";exportdefaultfunctionDemo(): ReactElement {// Note: You can also provide options to this hook like a custom `baseId` or// `menuLabel`.const{ menuRef, menuProps, onContextMenu }=useContextMenu();return(<><TextAreaid="simple-context-menu-area"onContextMenu={onContextMenu}placeholder="Right click me!"/><Menu{...menuProps}ref={menuRef}><MenuItemleftAddon={<ContentCutSVGIcon/>}>Cut</MenuItem><MenuItemleftAddon={<ContentCopySVGIcon/>}>Copy</MenuItem><MenuItemleftAddon={<ContentPasteSVGIcon/>}>Paste</MenuItem></Menu></>);}