diff options
| author | Mahesh Sanikommmu <[email protected]> | 2025-08-23 00:38:57 -0700 |
|---|---|---|
| committer | Mahesh Sanikommmu <[email protected]> | 2025-08-23 00:38:57 -0700 |
| commit | 3816666e2d9b5eaa6d8a0d0f0c838ede41a69f44 (patch) | |
| tree | 92ad10b35b9b9a07155304b560a283b53602a16c /apps/web/lib | |
| parent | fix: env vars (diff) | |
| download | supermemory-3816666e2d9b5eaa6d8a0d0f0c838ede41a69f44.tar.xz supermemory-3816666e2d9b5eaa6d8a0d0f0c838ede41a69f44.zip | |
ui (memory detail): improved memory detail view and open chat
Diffstat (limited to 'apps/web/lib')
| -rw-r--r-- | apps/web/lib/document-icon.tsx | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/apps/web/lib/document-icon.tsx b/apps/web/lib/document-icon.tsx new file mode 100644 index 00000000..3a80b2e0 --- /dev/null +++ b/apps/web/lib/document-icon.tsx @@ -0,0 +1,54 @@ +import { colors } from '@repo/ui/memory-graph/constants'; +import { + GoogleDocs, + MicrosoftWord, + NotionDoc, + GoogleDrive, + GoogleSheets, + GoogleSlides, + PDF, + OneDrive, + MicrosoftOneNote, + MicrosoftPowerpoint, + MicrosoftExcel, +} from '@ui/assets/icons'; +import { FileText } from 'lucide-react'; + +export const getDocumentIcon = (type: string, className: string) => { + const iconProps = { + className, + style: { color: colors.text.muted }, + }; + + switch (type) { + case 'google_doc': + return <GoogleDocs {...iconProps} />; + case 'google_sheet': + return <GoogleSheets {...iconProps} />; + case 'google_slide': + return <GoogleSlides {...iconProps} />; + case 'google_drive': + return <GoogleDrive {...iconProps} />; + case 'notion': + case 'notion_doc': + return <NotionDoc {...iconProps} />; + case 'word': + case 'microsoft_word': + return <MicrosoftWord {...iconProps} />; + case 'excel': + case 'microsoft_excel': + return <MicrosoftExcel {...iconProps} />; + case 'powerpoint': + case 'microsoft_powerpoint': + return <MicrosoftPowerpoint {...iconProps} />; + case 'onenote': + case 'microsoft_onenote': + return <MicrosoftOneNote {...iconProps} />; + case 'onedrive': + return <OneDrive {...iconProps} />; + case 'pdf': + return <PDF {...iconProps} />; + default: + return <FileText {...iconProps} />; + } +}; |