Add SideSheet component, refactor TOC and AIChat to use it (#3835)

This commit is contained in:
Zeno Kapitein
2026-01-19 21:19:54 +01:00
committed by GitHub
parent f294818775
commit 1e53376151
28 changed files with 591 additions and 428 deletions
+3 -1
View File
@@ -71,5 +71,7 @@ export function getAssetURL(location: Partial<IconsAssetsLocation>, path: string
*/
export function getIconAssetURL(context: IconsContextType, style: string, icon: string): string {
const location = context.assetsByStyles?.[style] ?? context;
return getAssetURL(location, `svgs/${style}/${icon}.svg`);
// Ensure icon is always a string to prevent [object Object]
const iconName = typeof icon === 'string' ? icon : String(icon);
return getAssetURL(location, `svgs/${style}/${iconName}.svg`);
}