@@ -2,6 +2,7 @@ import { Fragment } from "react/jsx-runtime";
22import { Box } from "../components/Box" ;
33import { ExternalLink } from "../components/ExternalLink" ;
44import { Header } from "../components/Header" ;
5+ import GlobeIcon from "../../public/svgs/globe.svg?react" ;
56import TagsIcon from "../../public/svgs/tags.svg?react" ;
67
78export default function VersionsRoute ( ) {
@@ -13,7 +14,7 @@ export default function VersionsRoute() {
1314 . sort ( ( a , b ) => b [ 0 ] . localeCompare ( a [ 0 ] ) )
1415 . map ( ( [ major , minors ] ) => (
1516 < Fragment key = { major } >
16- < div className = "text-lg" > Version { major } </ div >
17+ < div className = "text-lg mt-2 " > Version { major } </ div >
1718 < ul className = "pl-8" >
1819 { Object . entries ( minors )
1920 . sort ( ( a , b ) => b [ 0 ] . localeCompare ( a [ 0 ] ) )
@@ -35,29 +36,37 @@ const VERSIONS = {
3536 } ,
3637 "1" : {
3738 "1.8" : "https://react-window-v1.vercel.app" ,
38- "1.7" : "https://github.com/bvaughn/react-window/releases/tag/1.7.0 " ,
39- "1.6" : "https://github.com/bvaughn/react-window/releases/tag/1.6.0 " ,
40- "1.5" : "https://github.com/bvaughn/react-window/releases/tag/1.5.0 " ,
41- "1.4" : "https://github.com/bvaughn/react-window/releases/tag/1.4.0 " ,
42- "1.3" : "https://github.com/bvaughn/react-window/releases/tag/1.3.0 " ,
43- "1.2" : "https://github.com/bvaughn/react-window/releases/tag/1.2.0 " ,
44- "1.1" : "https://github.com/bvaughn/react-window/releases/tag/1.1.0 " ,
45- "1.0" : "https://github.com/bvaughn/react-window/releases/tag/1.0.0 "
39+ "1.7" : "" ,
40+ "1.6" : "" ,
41+ "1.5" : "" ,
42+ "1.4" : "" ,
43+ "1.3" : "" ,
44+ "1.2" : "" ,
45+ "1.1" : "" ,
46+ "1.0" : ""
4647 }
4748} ;
4849
4950function VersionLink ( { url, version } : { url : string ; version : string } ) {
5051 return (
5152 < li className = "list-disc" >
53+ { version }
54+ < span className = "text-slate-400" > .x</ span >
55+ { url && (
56+ < ExternalLink
57+ aria-label = { `Documentation for version ${ version } ` }
58+ className = "ml-4"
59+ href = { url }
60+ >
61+ < GlobeIcon className = "inline w-4 h-4 text-teal-200" /> documentation
62+ </ ExternalLink >
63+ ) }
5264 < ExternalLink
53- aria-label = "Documentation for library version 1.x"
54- href = { url }
65+ aria-label = { `GitHub tag for version ${ version } ` }
66+ className = "ml-4"
67+ href = { `https://github.com/bvaughn/react-window/releases/tag/${ version } ` }
5568 >
56- { version }
57- < span className = "text-teal-600" > .x</ span >
58- { url . startsWith ( "https://github" ) && (
59- < TagsIcon className = "inline w-4 h-4 ml-1 text-slate-600" />
60- ) }
69+ < TagsIcon className = "inline w-4 h-4 text-teal-200" /> source code
6170 </ ExternalLink >
6271 </ li >
6372 ) ;
0 commit comments