Skip to content

Commit aaa8f74

Browse files
committed
Better hero for non-color libraries
1 parent 28d4704 commit aaa8f74

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/components/LibraryHero.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ type LibraryHeroProps = {
1616

1717
export function LibraryHero({ project, cta, actions }: LibraryHeroProps) {
1818
const resolvedName = project.name.replace('TanStack ', '')
19-
const gradientText = `pr-1 inline-block text-transparent bg-clip-text bg-linear-to-r ${project.colorFrom} ${project.colorTo}`
19+
const hasColor =
20+
project.colorFrom && !project.colorFrom.includes('from-black')
21+
// For colorless libraries, use a gray-to-black gradient to create contrast with the black TanStack text
22+
const gradientText = hasColor
23+
? `pr-1 inline-block text-transparent bg-clip-text bg-linear-to-r ${project.colorFrom} ${project.colorTo}`
24+
: 'pr-1 inline-block text-transparent bg-clip-text bg-linear-to-r from-gray-400 to-black dark:from-gray-500 dark:to-white'
2025

2126
return (
2227
<div className="flex flex-col items-center gap-8 text-center px-4">

0 commit comments

Comments
 (0)