11import * as React from 'react'
2- import { TextAlignStart , ArrowLeft , ArrowRight , Menu , Tag } from 'lucide-react'
2+ import { TextAlignStart , ArrowLeft , ArrowRight , Menu } from 'lucide-react'
33import { GithubIcon } from '~/components/icons/GithubIcon'
44import { DiscordIcon } from '~/components/icons/DiscordIcon'
55import { Link , useMatches , useParams } from '@tanstack/react-router'
@@ -27,6 +27,7 @@ function DocsMenuStrip({
2727 colorFrom,
2828 colorTo,
2929 frameworkLogo,
30+ version,
3031 onHover,
3132 onClick,
3233} : {
@@ -36,6 +37,7 @@ function DocsMenuStrip({
3637 colorFrom : string
3738 colorTo : string
3839 frameworkLogo : string | undefined
40+ version : string
3941 onHover : ( ) => void
4042 onClick : ( ) => void
4143} ) {
@@ -104,7 +106,7 @@ function DocsMenuStrip({
104106 { /* FrameworkSelect + VersionSelect icons */ }
105107 < div className = "flex flex-col gap-2 shrink-0" >
106108 < div className = "flex items-center justify-center" >
107- < span className = "flex items-center justify-center w-6 h-6 rounded border border-gray-500/20 " >
109+ < span className = "flex items-center justify-center w-6 h-6" >
108110 { frameworkLogo ? (
109111 < img src = { frameworkLogo } alt = "" className = "w-4 h-4" />
110112 ) : (
@@ -113,8 +115,8 @@ function DocsMenuStrip({
113115 </ span >
114116 </ div >
115117 < div className = "flex items-center justify-center" >
116- < span className = "flex items-center justify-center w-6 h-6 rounded border border-gray-500/20 " >
117- < Tag className = "w-3.5 h-3.5 opacity-60" />
118+ < span className = "flex items-center justify-center px-1 py-0.5 text-[9px] font-medium opacity-60 border border-gray-500/30 rounded " >
119+ { version }
118120 </ span >
119121 </ div >
120122 </ div >
@@ -280,7 +282,7 @@ export function DocsLayout({
280282 repo,
281283 children,
282284} : DocsLayoutProps ) {
283- const { libraryId } = useParams ( {
285+ const { libraryId, version } = useParams ( {
284286 from : '/$libraryId/$version/docs' ,
285287 } )
286288 const { _splat } = useParams ( { strict : false } )
@@ -471,6 +473,7 @@ export function DocsLayout({
471473 colorFrom = { colorFrom }
472474 colorTo = { colorTo }
473475 frameworkLogo = { currentFrameworkOption ?. logo }
476+ version = { version }
474477 onHover = { ( ) => {
475478 if ( window . innerWidth < 1280 ) {
476479 // Only auto-show on lg screens, not xl+
@@ -544,7 +547,7 @@ export function DocsLayout({
544547 >
545548 { smallMenu }
546549 { largeMenu }
547- < div className = "flex flex-col max-w-full min-w-0 w-full min-h-0 relative px-4 sm:px-0 sm:pl -8" >
550+ < div className = "flex flex-col max-w-full min-w-0 flex-1 min-h-0 relative px-4 sm:px-8" >
548551 < div
549552 className = { twMerge (
550553 `max-w-full min-w-0 flex justify-center w-full min-h-[88dvh] sm:min-h-0` ,
@@ -605,8 +608,8 @@ export function DocsLayout({
605608 sm:top-[var(--navbar-height)]
606609 "
607610 >
608- < div className = "sm:sticky sm:top-[var(--navbar-height)] ml-auto flex flex-wrap flex-row justify-center sm:flex-col gap-4 pl -4 pb-4 " >
609- < div className = "flex flex-wrap items-stretch border-l border-gray-500/20 rounded-bl-lg overflow-hidden -mr-px " >
611+ < div className = "sm:sticky sm:top-[var(--navbar-height)] ml-auto flex flex-wrap flex-row justify-center sm:flex-col gap-4 pb -4 max-w-full overflow-hidden " >
612+ < div className = "flex flex-wrap items-stretch border-l border-gray-500/20 rounded-bl-lg overflow-hidden w-full " >
610613 < div className = "w-full flex gap-2 justify-between border-b border-gray-500/20 px-3 py-2" >
611614 < Link
612615 className = "font-medium opacity-60 hover:opacity-100 text-xs"
0 commit comments