import { Folder2, MusicNoteBeamed } from "@styled-icons/bootstrap"; import { EllipsisHorizontal } from "@styled-icons/ionicons-sharp"; import { NestedMenus, StatefulMenu } from "baseui/menu"; import { StatefulPopover } from "baseui/popover"; export type ContextMenuProps = { file: { id: string; name: string; type: string; }; }; function ContextMenu(props: ContextMenuProps) { const { file } = props; return ( (
{file.type == "folder" && (
)} {file.type !== "folder" && (
)}
{file.name}
{ console.log(`Selected item: ${item.label}`); close(); }} overrides={{ List: { style: { boxShadow: "none", outline: "none !important", backgroundColor: "var(--color-background)", }, }, ListItem: { style: { backgroundColor: "var(--color-background)", color: "var(--color-text)", ":hover": { backgroundColor: "var(--color-menu-hover)", }, }, }, Option: { props: { getChildMenu: (item: { label: string }) => { if (item.label === "Add to Playlist") { return (
); } return null; }, }, }, }} />
)} overrides={{ Inner: { style: { backgroundColor: "var(--color-background)", }, }, }} >
); } export default ContextMenu;