implemented copy paste
This commit is contained in:
@@ -6,11 +6,14 @@ export const CONTEXT_MENU_FILE = "CONTEXT_MENU_FILE"
|
||||
export const CONTEXT_MENU_DIR = "CONTEXT_MENU_DIR"
|
||||
|
||||
export enum Action {
|
||||
FileDelete
|
||||
FileDelete,
|
||||
FileCopy,
|
||||
FilePaste
|
||||
}
|
||||
|
||||
interface Props {
|
||||
onSelect?: (action: Action, id: string)=>void
|
||||
pasteActive?: boolean
|
||||
}
|
||||
|
||||
const FileBrowserContextMenu: React.FC<Props> = (props) => {
|
||||
@@ -25,7 +28,8 @@ const FileBrowserContextMenu: React.FC<Props> = (props) => {
|
||||
<>
|
||||
<Menu id={CONTEXT_MENU_FILE} animation={false}>
|
||||
<Item onClick={onClick} data={Action.FileDelete} >Delete</Item>
|
||||
<Item onClick={onClick} data="item2" >Item 2</Item>
|
||||
<Item onClick={onClick} data={Action.FileCopy} >Copy</Item>
|
||||
<Item onClick={onClick} data={Action.FilePaste} disabled={!props.pasteActive}>Paste</Item>
|
||||
<Separator />
|
||||
<Item disabled>Disabled</Item>
|
||||
<Separator />
|
||||
|
||||
Reference in New Issue
Block a user