Hanzo Dev commited on
Commit
bbc67f0
·
1 Parent(s): 2363ef1

Replace @hanzo /ui with local UI components for React 19 compatibility

Browse files
components/sections/features.tsx CHANGED
@@ -1,5 +1,5 @@
1
  import { siteConfig } from '@/lib/site'
2
- import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@hanzo/ui/primitives'
3
 
4
  export function Features() {
5
  return (
 
1
  import { siteConfig } from '@/lib/site'
2
+ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
3
 
4
  export function Features() {
5
  return (
components/sections/hero.tsx CHANGED
@@ -1,5 +1,5 @@
1
  import { siteConfig } from '@/lib/site'
2
- import { Button } from '@hanzo/ui/primitives'
3
 
4
  export function Hero() {
5
  return (
 
1
  import { siteConfig } from '@/lib/site'
2
+ import { Button } from '@/components/ui/button'
3
 
4
  export function Hero() {
5
  return (
components/ui/button.tsx ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as React from 'react'
2
+ import { cn } from '@/lib/utils'
3
+
4
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
5
+ variant?: 'default' | 'outline' | 'ghost'
6
+ size?: 'default' | 'sm' | 'lg'
7
+ }
8
+
9
+ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
10
+ ({ className, variant = 'default', size = 'default', ...props }, ref) => {
11
+ return (
12
+ <button
13
+ className={cn(
14
+ 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
15
+ {
16
+ 'bg-primary text-primary-foreground hover:bg-primary/90': variant === 'default',
17
+ 'border border-input bg-background hover:bg-accent hover:text-accent-foreground': variant === 'outline',
18
+ 'hover:bg-accent hover:text-accent-foreground': variant === 'ghost',
19
+ },
20
+ {
21
+ 'h-10 px-4 py-2': size === 'default',
22
+ 'h-9 rounded-md px-3': size === 'sm',
23
+ 'h-11 rounded-md px-8': size === 'lg',
24
+ },
25
+ className
26
+ )}
27
+ ref={ref}
28
+ {...props}
29
+ />
30
+ )
31
+ }
32
+ )
33
+ Button.displayName = 'Button'
34
+
35
+ export { Button }
components/ui/card.tsx ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as React from 'react'
2
+ import { cn } from '@/lib/utils'
3
+
4
+ const Card = React.forwardRef<
5
+ HTMLDivElement,
6
+ React.HTMLAttributes<HTMLDivElement>
7
+ >(({ className, ...props }, ref) => (
8
+ <div
9
+ ref={ref}
10
+ className={cn(
11
+ 'rounded-lg border bg-card text-card-foreground shadow-sm',
12
+ className
13
+ )}
14
+ {...props}
15
+ />
16
+ ))
17
+ Card.displayName = 'Card'
18
+
19
+ const CardHeader = React.forwardRef<
20
+ HTMLDivElement,
21
+ React.HTMLAttributes<HTMLDivElement>
22
+ >(({ className, ...props }, ref) => (
23
+ <div
24
+ ref={ref}
25
+ className={cn('flex flex-col space-y-1.5 p-6', className)}
26
+ {...props}
27
+ />
28
+ ))
29
+ CardHeader.displayName = 'CardHeader'
30
+
31
+ const CardTitle = React.forwardRef<
32
+ HTMLParagraphElement,
33
+ React.HTMLAttributes<HTMLHeadingElement>
34
+ >(({ className, ...props }, ref) => (
35
+ <h3
36
+ ref={ref}
37
+ className={cn(
38
+ 'text-2xl font-semibold leading-none tracking-tight',
39
+ className
40
+ )}
41
+ {...props}
42
+ />
43
+ ))
44
+ CardTitle.displayName = 'CardTitle'
45
+
46
+ const CardDescription = React.forwardRef<
47
+ HTMLParagraphElement,
48
+ React.HTMLAttributes<HTMLParagraphElement>
49
+ >(({ className, ...props }, ref) => (
50
+ <p
51
+ ref={ref}
52
+ className={cn('text-sm text-muted-foreground', className)}
53
+ {...props}
54
+ />
55
+ ))
56
+ CardDescription.displayName = 'CardDescription'
57
+
58
+ const CardContent = React.forwardRef<
59
+ HTMLDivElement,
60
+ React.HTMLAttributes<HTMLDivElement>
61
+ >(({ className, ...props }, ref) => (
62
+ <div ref={ref} className={cn('p-6 pt-0', className)} {...props} />
63
+ ))
64
+ CardContent.displayName = 'CardContent'
65
+
66
+ export { Card, CardContent, CardDescription, CardHeader, CardTitle }
lib/utils.ts ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ import { clsx, type ClassValue } from 'clsx'
2
+ import { twMerge } from 'tailwind-merge'
3
+
4
+ export function cn(...inputs: ClassValue[]) {
5
+ return twMerge(clsx(inputs))
6
+ }