@@ -4,7 +4,11 @@ import Image from "next/image";
4
4
import { useEffect , useState , type ReactElement } from "react" ;
5
5
import bookPromo from "./book-promo.png" ;
6
6
import coursePromo from "./course-promo.jpg" ;
7
- import LinkButton from "./home/link-button" ;
7
+ // import LinkButton from "./home/link-button";
8
+
9
+ import clsx from "clsx" ;
10
+ import Link from "next/link" ;
11
+ import React from "react" ;
8
12
9
13
export function BookPromo ( ) {
10
14
return (
@@ -68,7 +72,7 @@ export function CoursePromo() {
68
72
</ div >
69
73
</ div >
70
74
</ div >
71
- < p className = "text-[0.815rem ]/6 font-semibold text-sky-500 dark:text-sky-400" > 5-day mini-course</ p >
75
+ < p className = "text-[0.8125rem ]/6 font-semibold text-sky-500 dark:text-sky-400" > 5-day mini-course</ p >
72
76
< p className = "mt-1.5 text-base/5 font-semibold text-gray-950 dark:text-white" > Build UIs that don’t suck.</ p >
73
77
< p className = "mt-3 text-[0.8125rem]/5 text-gray-600 dark:text-gray-400" >
74
78
Short, tactical video lessons from the creator of Tailwind CSS, delivered directly to your inbox every day for a
@@ -84,6 +88,28 @@ export function CoursePromo() {
84
88
) ;
85
89
}
86
90
91
+ export default function LinkButton ( {
92
+ className,
93
+ children,
94
+ href,
95
+ } : {
96
+ children : React . ReactNode ;
97
+ className ?: string ;
98
+ href : string ;
99
+ } ) {
100
+ return (
101
+ < Link
102
+ href = { href }
103
+ className = { clsx (
104
+ className ,
105
+ "inline-block rounded-4xl bg-black px-3.5 py-1.25 text-[0.8125rem]/6 font-semibold text-white hover:bg-gray-800 dark:bg-gray-700 dark:hover:bg-gray-600" ,
106
+ ) }
107
+ >
108
+ { children }
109
+ </ Link >
110
+ ) ;
111
+ }
112
+
87
113
export function RandomPromo ( ) {
88
114
const [ PromoComponent , setPromoComponent ] = useState < ReactElement | null > ( null ) ;
89
115
0 commit comments