@@ -4,7 +4,11 @@ import Image from "next/image";
44import { useEffect , useState , type ReactElement } from "react" ;
55import bookPromo from "./book-promo.png" ;
66import 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" ;
812
913export function BookPromo ( ) {
1014 return (
@@ -68,7 +72,7 @@ export function CoursePromo() {
6872 </ div >
6973 </ div >
7074 </ 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 >
7276 < p className = "mt-1.5 text-base/5 font-semibold text-gray-950 dark:text-white" > Build UIs that don’t suck.</ p >
7377 < p className = "mt-3 text-[0.8125rem]/5 text-gray-600 dark:text-gray-400" >
7478 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() {
8488 ) ;
8589}
8690
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+
87113export function RandomPromo ( ) {
88114 const [ PromoComponent , setPromoComponent ] = useState < ReactElement | null > ( null ) ;
89115
0 commit comments