Skip to content

Commit 3b8c738

Browse files
committed
feat(source): Add icon handling to programsSource loader
1 parent bf45b74 commit 3b8c738

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/lib/source.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,11 @@ export const source = loader({
2020
export const programsSource = loader({
2121
baseUrl: "/programs",
2222
source: programs.toFumadocsSource(),
23+
icon(icon) {
24+
if (!icon) {
25+
// You may set a default icon
26+
return;
27+
}
28+
if (icon in icons) return createElement(icons[icon as keyof typeof icons]);
29+
},
2330
});

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy