diff --git a/src/components/MaintainerCard.tsx b/src/components/MaintainerCard.tsx
index dae903454..921aa183b 100644
--- a/src/components/MaintainerCard.tsx
+++ b/src/components/MaintainerCard.tsx
@@ -1,13 +1,12 @@
-import { Library, Framework } from '~/libraries'
+import type { Framework, Library, LibrarySlim } from '~/libraries'
import { frameworkOptions } from '~/libraries/frameworks'
+import { fallbackLibraryIcon, libraryIcons } from '~/libraries/icons'
import {
getRoleInLibrary,
Maintainer,
getPersonsMaintainerOf,
} from '~/libraries/maintainers'
-import { useState } from 'react'
import { Link } from '@tanstack/react-router'
-import { twMerge } from 'tailwind-merge'
import { MaintainerAvatarImage } from './MaintainerAvatarImage'
function RoleBadge({
@@ -54,19 +53,15 @@ function RoleBadge({
function FrameworkChip({ framework }: { framework: Framework }) {
const frameworkOption = frameworkOptions.find((f) => f.value === framework)
const bgColor = frameworkOption?.color || 'bg-gray-500'
+ const textColor =
+ framework === 'solid' || framework === 'alpine'
+ ? 'text-white'
+ : 'text-black'
return (
-
{frameworkOption?.label || framework}
)
@@ -75,52 +70,50 @@ function FrameworkChip({ framework }: { framework: Framework }) {
function SpecialtyChip({ specialty }: { specialty: string }) {
return (
-
{specialty}
)
}
-function LibraryBadge({ library }: { library: Library }) {
- const bgClass = `${library.bgStyle ?? 'bg-category-tooling'}/40`
+function LibraryBadge({ library }: { library: LibrarySlim }) {
+ const Icon = libraryIcons[library.id] ?? fallbackLibraryIcon
+ const textColor =
+ library.bgStyle === 'bg-category-tooling'
+ ? 'text-white dark:text-black'
+ : 'text-black'
+ const badgeClass = `inline-flex items-center gap-1 px-2.5 py-1 rounded-full text-xs font-semibold ${library.bgStyle} ${textColor}`
+ const label = (
+ <>
+
+ {library.name.replace(/^TanStack\s+/, '')}
+ >
+ )
+
if (library.to) {
return (
e.stopPropagation()}
title={`View all contributors for ${library.name}`}
>
- {library.name.replace('TanStack', '🌴')}
+ {label}
)
}
return (
- {library.name.replace('TanStack', '🌴')}
+ {label}
)
}
@@ -289,7 +282,6 @@ export function MaintainerRowCard({
libraryId,
}: MaintainerRowCardProps) {
const libraries = getPersonsMaintainerOf(maintainer)
- const [showAllLibraries, setShowAllLibraries] = useState(false)
return (
0 &&
- libraries
- .slice(0, showAllLibraries ? undefined : 2)
- .map((library) => (
-
- ))}
-
- {/* Show more button */}
- {!libraryId && !showAllLibraries && libraries.length > 2 && (
-
- )}
+ libraries.map((library) => (
+
+ ))}
)}
diff --git a/src/libraries/icons.ts b/src/libraries/icons.ts
index 51fabb790..f8612cbbc 100644
--- a/src/libraries/icons.ts
+++ b/src/libraries/icons.ts
@@ -1,5 +1,6 @@
import { EraserIcon } from '@phosphor-icons/react/Eraser'
import { BrainIcon } from '@phosphor-icons/react/Brain'
+import { ChartLineIcon } from '@phosphor-icons/react/ChartLine'
import { ChartLineUpIcon } from '@phosphor-icons/react/ChartLineUp'
import { ClipboardTextIcon } from '@phosphor-icons/react/ClipboardText'
import { CrosshairIcon } from '@phosphor-icons/react/Crosshair'
@@ -10,12 +11,14 @@ import { GogglesIcon } from '@phosphor-icons/react/Goggles'
import { HighlighterIcon } from '@phosphor-icons/react/Highlighter'
import { MarkdownLogoIcon } from '@phosphor-icons/react/MarkdownLogo'
import { PencilRulerIcon } from '@phosphor-icons/react/PencilRuler'
+import { PlugsConnectedIcon } from '@phosphor-icons/react/PlugsConnected'
import { SealQuestionIcon } from '@phosphor-icons/react/SealQuestion'
import { SlidersIcon } from '@phosphor-icons/react/Sliders'
import { SmileyMeltingIcon } from '@phosphor-icons/react/SmileyMelting'
import { SunHorizonIcon } from '@phosphor-icons/react/SunHorizon'
import { TableIcon } from '@phosphor-icons/react/Table'
import { TargetIcon } from '@phosphor-icons/react/Target'
+import { TerminalIcon } from '@phosphor-icons/react/Terminal'
import { TerminalWindowIcon } from '@phosphor-icons/react/TerminalWindow'
import { TimerIcon } from '@phosphor-icons/react/Timer'
import { TrafficSignIcon } from '@phosphor-icons/react/TrafficSign'
@@ -48,6 +51,9 @@ export const libraryIcons: Record = {
cli: TerminalWindowIcon,
intent: CrosshairIcon,
ranger: SlidersIcon,
+ mcp: PlugsConnectedIcon,
+ 'react-charts': ChartLineIcon,
+ 'create-tsrouter-app': TerminalIcon,
}
/** Fallback icon for libraries without a specific mapping. */