File tree Expand file tree Collapse file tree 3 files changed +59
-1
lines changed Expand file tree Collapse file tree 3 files changed +59
-1
lines changed Original file line number Diff line number Diff line change 1+ "use client" ;
2+
3+ import { ArrowRight , Package2 } from "lucide-react" ;
4+ import Link from "next/link" ;
5+ import { usePlausible } from "next-plausible" ;
6+ import { cn } from "@/app/_utils/cn" ;
7+
8+ type KitBannerProps = {
9+ className ?: string ;
10+ componentUrl ?: string ;
11+ } ;
12+
13+ export const KitBanner = ( { className, componentUrl } : KitBannerProps ) => {
14+ const plausible = usePlausible ( ) ;
15+ const href = componentUrl || "https://kit.uxpatterns.dev" ;
16+
17+ return (
18+ < div
19+ className = { cn (
20+ "border border-neutral-200 dark:border-neutral-800 bg-white dark:bg-neutral-900 mt-4 p-6 rounded-lg" ,
21+ className ,
22+ ) }
23+ >
24+ < Link
25+ href = { href }
26+ target = "_blank"
27+ rel = "noopener"
28+ className = "group flex items-center justify-between hover:no-underline"
29+ onClick = { ( ) => {
30+ plausible ( "UP Kit Banner Click" , {
31+ props : {
32+ source : "pattern_page" ,
33+ } ,
34+ } ) ;
35+ } }
36+ >
37+ < div className = "flex items-center gap-3" >
38+ < div className = "flex h-8 w-8 items-center justify-center rounded-md bg-blue-100 dark:bg-blue-900" >
39+ < Package2 className = "h-4 w-4 text-blue-600 dark:text-blue-300" />
40+ </ div >
41+ < div className = "flex flex-col items-start" >
42+ < h3 className = "text-lg font-semibold tracking-tight" >
43+ UP Kit Component
44+ </ h3 >
45+ < p className = "text-sm text-gray-600 dark:text-gray-300" >
46+ Get ready-to-use React components for this pattern
47+ </ p >
48+ </ div >
49+ </ div >
50+ < ArrowRight className = "h-5 w-5 text-gray-400 dark:text-gray-500 transition-transform group-hover:translate-x-1" />
51+ </ Link >
52+ </ div >
53+ ) ;
54+ } ;
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { PatternPreview } from "@app/_components/pattern-preview";
1414import { PatternStats } from " @app/_components/pattern-stats" ;
1515import { PatternComparison } from " @app/_components/pattern-comparison" ;
1616import { RelatedPatternsCard } from " @app/_components/related-patterns-card" ;
17+ import { KitBanner } from " @app/_components/kit-banner" ;
1718
1819# Button
1920
@@ -35,6 +36,8 @@ import { RelatedPatternsCard } from "@app/_components/related-patterns-card";
3536 description = " A native HTML button with optional styling enhancements. No JavaScript required unless adding advanced behaviors."
3637/>
3738
39+ <KitBanner componentUrl = " https://kit.uxpatterns.dev/docs/components/button" />
40+
3841## Use Cases
3942
4043### When to use:
Original file line number Diff line number Diff line change 3434 " MDX_API_KEY" ,
3535 " MAILERLITE_API_KEY" ,
3636 " MAILERLITE_GROUP_IDS" ,
37- " PLAUSIBLE_API_KEY"
37+ " PLAUSIBLE_API_KEY" ,
38+ " TURBO_REMOTE_CACHE_SIGNATURE_KEY"
3839 ]
3940 },
4041 "dev" : {
You can’t perform that action at this time.
0 commit comments