forked from TanStack/tanstack.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDocsLogo.tsx
More file actions
39 lines (36 loc) · 849 Bytes
/
DocsLogo.tsx
File metadata and controls
39 lines (36 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { Link } from '@tanstack/react-router'
import { ThemeToggle } from './ThemeToggle'
type Props = {
name: string
libraryId: string
version: string
colorFrom: string
colorTo: string
}
export const DocsLogo = ({
name,
version,
colorFrom,
colorTo,
libraryId,
}: Props) => {
const gradientText = `inline-block text-transparent bg-clip-text bg-gradient-to-r ${colorFrom} ${colorTo}`
return (
<>
<Link to="/" className="font-light">
TanStack
</Link>
<Link
to={`/$libraryId`}
className="font-bold whitespace-nowrap"
params={{ libraryId }}
>
<span className={`${gradientText}`}>{name}</span>{' '}
<span className="text-sm align-super">{version}</span>
</Link>
<div className="ml-auto">
<ThemeToggle />
</div>
</>
)
}