|
| 1 | +diff --git a/node_modules/@astrojs/starlight/components/SidebarSublist.astro b/node_modules/@astrojs/starlight/components/SidebarSublist.astro |
| 2 | +index a027f56..639be81 100644 |
| 3 | +--- a/node_modules/@astrojs/starlight/components/SidebarSublist.astro |
| 4 | ++++ b/node_modules/@astrojs/starlight/components/SidebarSublist.astro |
| 5 | +@@ -4,6 +4,7 @@ import type { SidebarEntry } from '../utils/routing/types'; |
| 6 | + import Icon from '../user-components/Icon.astro'; |
| 7 | + import Badge from '../user-components/Badge.astro'; |
| 8 | + import SidebarRestorePoint from './SidebarRestorePoint.astro'; |
| 9 | ++import SidebarIcon from "~/components/SidebarIcon.astro"; |
| 10 | + |
| 11 | + interface Props { |
| 12 | + sublist: SidebarEntry[]; |
| 13 | +@@ -24,7 +25,7 @@ const { sublist, nested } = Astro.props; |
| 14 | + class:list={[{ large: !nested }, entry.attrs.class]} |
| 15 | + {...entry.attrs} |
| 16 | + > |
| 17 | +- <span>{entry.label}</span> |
| 18 | ++ <span>{entry.icon && <SidebarIcon {...entry.icon} />}{entry.label}</span> |
| 19 | + {entry.badge && ( |
| 20 | + <Badge |
| 21 | + variant={entry.badge.variant} |
| 22 | +diff --git a/node_modules/@astrojs/starlight/user-components/Tabs.astro b/node_modules/@astrojs/starlight/user-components/Tabs.astro |
| 23 | +index 6d173df..61eed80 100644 |
| 24 | +--- a/node_modules/@astrojs/starlight/user-components/Tabs.astro |
| 25 | ++++ b/node_modules/@astrojs/starlight/user-components/Tabs.astro |
| 26 | +@@ -3,10 +3,11 @@ import Icon from './Icon.astro'; |
| 27 | + import { processPanels } from './rehype-tabs'; |
| 28 | + |
| 29 | + interface Props { |
| 30 | ++ IconComponent?: typeof Icon; |
| 31 | + syncKey?: string; |
| 32 | + } |
| 33 | + |
| 34 | +-const { syncKey } = Astro.props; |
| 35 | ++const { syncKey, IconComponent = Icon } = Astro.props; |
| 36 | + const panelHtml = await Astro.slots.render('default'); |
| 37 | + const { html, panels } = processPanels(panelHtml); |
| 38 | + |
| 39 | +@@ -84,7 +85,7 @@ if (isSynced) { |
| 40 | + aria-selected={idx === 0 ? 'true' : 'false'} |
| 41 | + tabindex={idx !== 0 ? -1 : 0} |
| 42 | + > |
| 43 | +- {icon && <Icon name={icon} />} |
| 44 | ++ {icon && <IconComponent name={icon} />} |
| 45 | + {label} |
| 46 | + </a> |
| 47 | + </li> |
0 commit comments