feat: implement CanvasMenubar component and integrate keyboard shortcuts
This commit is contained in:
@@ -1,27 +1,40 @@
|
||||
/**
|
||||
* Map project icon ids to Lucide icons for the sidebar.
|
||||
* Only Lucide "Animals" category icons are allowed for projects.
|
||||
*/
|
||||
|
||||
import {
|
||||
LayoutDashboard,
|
||||
Folder,
|
||||
FileStack,
|
||||
Sparkles,
|
||||
Box,
|
||||
Layers,
|
||||
Bird,
|
||||
Bug,
|
||||
Cat,
|
||||
Dog,
|
||||
Egg,
|
||||
Fish,
|
||||
Rabbit,
|
||||
Rat,
|
||||
Shrimp,
|
||||
Snail,
|
||||
Squirrel,
|
||||
Turtle,
|
||||
type LucideIcon,
|
||||
} from 'lucide-react'
|
||||
import type { ProjectIconId } from './types'
|
||||
|
||||
export const PROJECT_ICON_MAP: Record<ProjectIconId, LucideIcon> = {
|
||||
layout: LayoutDashboard,
|
||||
folder: Folder,
|
||||
'file-stack': FileStack,
|
||||
sparkles: Sparkles,
|
||||
box: Box,
|
||||
layers: Layers,
|
||||
bird: Bird,
|
||||
bug: Bug,
|
||||
cat: Cat,
|
||||
dog: Dog,
|
||||
fish: Fish,
|
||||
rat: Rat,
|
||||
rabbit: Rabbit,
|
||||
squirrel: Squirrel,
|
||||
turtle: Turtle,
|
||||
snail: Snail,
|
||||
shrimp: Shrimp,
|
||||
egg: Egg
|
||||
}
|
||||
|
||||
export function getProjectIcon(iconId: string): LucideIcon {
|
||||
return PROJECT_ICON_MAP[iconId as ProjectIconId] ?? LayoutDashboard
|
||||
return PROJECT_ICON_MAP[iconId as ProjectIconId] ?? Cat
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user