@@ -24,7 +24,7 @@ import {
24
24
TooltipTrigger ,
25
25
} from "@rafty/ui" ;
26
26
import { useTheme } from "next-themes" ;
27
- import { Dispatch , ReactNode , SetStateAction , useState } from "react" ;
27
+ import { Dispatch , PropsWithChildren , SetStateAction , useState } from "react" ;
28
28
import { Fence } from "../../components/Fence" ;
29
29
30
30
const COLOR_THEME = {
@@ -41,7 +41,7 @@ const COLOR_THEME = {
41
41
fuchsia : "!bg-fuchsia-500" ,
42
42
pink : "!bg-pink-500" ,
43
43
rose : "!bg-rose-500" ,
44
- } ;
44
+ } as const ;
45
45
46
46
const defaults : ( keyof typeof COLOR_THEME ) [ ] = [
47
47
"purple" ,
@@ -51,11 +51,7 @@ const defaults: (keyof typeof COLOR_THEME)[] = [
51
51
"gray" ,
52
52
] ;
53
53
54
- export default function ThemeBuilderWrapper ( {
55
- children,
56
- } : {
57
- children : ReactNode ;
58
- } ) {
54
+ export default function ThemeBuilderWrapper ( { children } : PropsWithChildren ) {
59
55
const [ color , changeColor ] = useState < keyof typeof COLOR_THEME > ( "purple" ) ;
60
56
61
57
return (
@@ -65,9 +61,9 @@ export default function ThemeBuilderWrapper({
65
61
< div className = "flex flex-col justify-start lg:flex-row lg:justify-between" >
66
62
< div >
67
63
< h1 className = "text-3xl font-bold md:text-3xl" > Make it yours.</ h1 >
68
- < h4 className = "text-secondary-400 text-sm lg:text-lg" >
64
+ < h2 className = "text-secondary-400 text-sm lg:text-lg" >
69
65
Hand-picked themes that you can copy and paste into your apps.
70
- </ h4 >
66
+ </ h2 >
71
67
</ div >
72
68
< div className = "flex items-center gap-1.5 py-2 md:gap-3" >
73
69
{ defaults . map ( ( c ) => (
@@ -78,6 +74,7 @@ export default function ThemeBuilderWrapper({
78
74
size = "fab"
79
75
className = { `${ COLOR_THEME [ c ] } min-h-[26px] min-w-[26px] !p-1` }
80
76
onClick = { ( ) => changeColor ( c as keyof typeof COLOR_THEME ) }
77
+ name = { `${ c } button` }
81
78
>
82
79
{ color == c && (
83
80
< CheckIcon
0 commit comments