File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ import { toast, Toaster } from "sonner";
2222import LoadingDots from "../../components/loading-dots" ;
2323import { shareApp } from "./actions" ;
2424
25+ const FEATURES = {
26+ shadcn : false ,
27+ } ;
28+
2529export default function Home ( ) {
2630 let [ status , setStatus ] = useState <
2731 "initial" | "creating" | "created" | "updating" | "updated"
@@ -291,18 +295,20 @@ export default function Home() {
291295 </ Select . Root >
292296 </ div >
293297
294- < div className = "flex h-full items-center justify-between gap-3 sm:justify-center" >
295- < label className = "text-gray-500 sm:text-xs" htmlFor = "shadcn" >
296- shadcn/ui:
297- </ label >
298- < Switch . Root
299- className = "group flex w-20 max-w-xs items-center rounded-2xl border-[6px] border-gray-300 bg-white p-1.5 text-sm shadow-inner transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-500 data-[state=checked]:bg-blue-500"
300- id = "shadcn"
301- name = "shadcn"
302- >
303- < Switch . Thumb className = "size-7 rounded-lg bg-gray-200 shadow-[0_1px_2px] shadow-gray-400 transition data-[state=checked]:translate-x-7 data-[state=checked]:bg-white data-[state=checked]:shadow-gray-600" />
304- </ Switch . Root >
305- </ div >
298+ { FEATURES . shadcn && (
299+ < div className = "flex h-full items-center justify-between gap-3 sm:justify-center" >
300+ < label className = "text-gray-500 sm:text-xs" htmlFor = "shadcn" >
301+ shadcn/ui:
302+ </ label >
303+ < Switch . Root
304+ className = "group flex w-20 max-w-xs items-center rounded-2xl border-[6px] border-gray-300 bg-white p-1.5 text-sm shadow-inner transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-500 data-[state=checked]:bg-blue-500"
305+ id = "shadcn"
306+ name = "shadcn"
307+ >
308+ < Switch . Thumb className = "size-7 rounded-lg bg-gray-200 shadow-[0_1px_2px] shadow-gray-400 transition data-[state=checked]:translate-x-7 data-[state=checked]:bg-white data-[state=checked]:shadow-gray-600" />
309+ </ Switch . Root >
310+ </ div >
311+ ) }
306312 </ div >
307313 </ fieldset >
308314 </ form >
You can’t perform that action at this time.
0 commit comments