feat: add Sheet and Sidebar components for improved UI layout
- Introduced a new Sheet component for modal-like functionality with customizable content and animations. - Implemented a Sidebar component with mobile responsiveness, state management, and keyboard shortcuts for toggling. - Added Skeleton component for loading states and Tooltip component for enhanced user guidance. - Created a useIsMobile hook to manage mobile view detection. - Updated main entry point to render the new PlatformPage component. - Enhanced styles for sidebar and scrollbar customization in CSS. - Extended Tailwind configuration to include sidebar color variables for better theming.
This commit is contained in:
27
frontend/src/app/platform/icon-map.tsx
Normal file
27
frontend/src/app/platform/icon-map.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Map project icon ids to Lucide icons for the sidebar.
|
||||
*/
|
||||
|
||||
import {
|
||||
LayoutDashboard,
|
||||
Folder,
|
||||
FileStack,
|
||||
Sparkles,
|
||||
Box,
|
||||
Layers,
|
||||
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,
|
||||
}
|
||||
|
||||
export function getProjectIcon(iconId: string): LucideIcon {
|
||||
return PROJECT_ICON_MAP[iconId as ProjectIconId] ?? LayoutDashboard
|
||||
}
|
||||
Reference in New Issue
Block a user