docs(core): api icons fallback (#30499)

Add rsbuild icon and update rspack icon. `nx-api` icons default to Nx
icon if none is specified.
This commit is contained in:
Isaac Mann 2025-03-26 11:28:37 -04:00 committed by GitHub
parent e6d8b3913b
commit b21af21657
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 869 additions and 44 deletions

View File

@ -119,7 +119,7 @@ export default function Packages({
<img
className="h-5 w-5 object-cover opacity-75 dark:invert"
loading="lazy"
src={iconsMap[pkg.name]}
src={iconsMap[pkg.name] || iconsMap['nx']}
alt={pkg.name + ' illustration'}
aria-hidden="true"
/>

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 31 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -1,5 +1,7 @@
export const iconsMap: Record<string, string> = {
angular: '/images/icons/angular.svg',
'angular-rsbuild': '/images/icons/rsbuild.svg',
'angular-rspack': '/images/icons/rspack.svg',
cli: '/images/icons/nx.svg',
cypress: '/images/icons/cypress.svg',
detox: '/images/icons/react.svg',
@ -32,6 +34,7 @@ export const iconsMap: Record<string, string> = {
'react-native': '/images/icons/react.svg',
remix: '/images/icons/remix.svg',
rollup: '/images/icons/rollup.svg',
rsbuild: '/images/icons/rsbuild.svg',
rspack: '/images/icons/rspack.svg',
storybook: '/images/icons/storybook.svg',
vite: '/images/icons/vite.svg',