File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ import { useRouter } from "next/navigation";
77import { useState } from "react" ;
88import { IconButton } from "./icon-button" ;
99import { SearchButton } from "./search" ;
10+ import { version } from "tailwindcss/package.json" ;
11+
12+ const TAILWINDCSS_VERSION = version . split ( "." ) . slice ( 0 , 2 ) . join ( "." ) ;
1013
1114function Logo ( props : React . ComponentProps < "svg" > ) {
1215 return (
@@ -54,7 +57,7 @@ function VersionPicker() {
5457 className = "flex items-center gap-0.5 rounded-2xl bg-gray-950/5 py-0.5 pr-1.5 pl-2.5 text-xs/5 font-medium text-gray-950 tabular-nums hover:bg-gray-950/7.5 data-active:bg-gray-950/7.5 dark:bg-white/10 dark:text-white dark:hover:bg-white/12.5 dark:data-active:bg-white/12.5"
5558 aria-label = "Select version of library"
5659 >
57- v4.2
60+ v { TAILWINDCSS_VERSION }
5861 < ChevronDownIcon className = "size-4 fill-gray-400" />
5962 </ MenuButton >
6063 < MenuItems
@@ -63,7 +66,7 @@ function VersionPicker() {
6366 >
6467 < MenuItem disabled >
6568 < div className = "flex items-center justify-between gap-2 rounded-lg px-2.5 data-active:bg-gray-950/5 dark:data-active:bg-white/10" >
66- v4.2
69+ v { TAILWINDCSS_VERSION }
6770 < CheckIcon className = "size-4" />
6871 </ div >
6972 </ MenuItem >
You can’t perform that action at this time.
0 commit comments