import { Command } from "cmdk"; import { ContrastIcon, FileText } from "lucide-react"; // hooks import { DiceIcon, PhotoFilterIcon } from "@plane/ui"; import { useApplication, useEventTracker } from "hooks/store"; // ui type Props = { closePalette: () => void; }; export const CommandPaletteProjectActions: React.FC = (props) => { const { closePalette } = props; const { commandPalette: { toggleCreateCycleModal, toggleCreateModuleModal, toggleCreatePageModal, toggleCreateViewModal }, } = useApplication(); const { setTrackElement } = useEventTracker(); return ( <> { closePalette(); setTrackElement("Command palette"); toggleCreateCycleModal(true); }} className="focus:outline-none" >
Create new cycle
Q
{ closePalette(); setTrackElement("Command palette"); toggleCreateModuleModal(true); }} className="focus:outline-none" >
Create new module
M
{ closePalette(); setTrackElement("Command palette"); toggleCreateViewModal(true); }} className="focus:outline-none" >
Create new view
V
{ closePalette(); setTrackElement("Command palette"); toggleCreatePageModal(true); }} className="focus:outline-none" >
Create new page
D
); };