forked from StellarSend/frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCard.tsx
More file actions
101 lines (94 loc) · 1.76 KB
/
Copy pathCard.tsx
File metadata and controls
101 lines (94 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import React from 'react'
import { cn } from '@/lib/utils'
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
glow?: boolean
glass?: boolean
padding?: 'none' | 'sm' | 'md' | 'lg'
}
const paddingMap = {
none: '',
sm: 'p-4',
md: 'p-5',
lg: 'p-6',
}
export function Card({
children,
glow = false,
glass = false,
padding = 'md',
className,
...props
}: CardProps) {
return (
<div
className={cn(
'rounded-2xl border border-navy-600/50 shadow-card',
glass
? 'bg-glass backdrop-blur-sm'
: 'bg-navy-800/80',
glow && 'shadow-stellar border-stellar-600/30',
paddingMap[padding],
className,
)}
{...props}
>
{children}
</div>
)
}
export function CardHeader({
children,
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) {
return (
<div
className={cn('flex items-center justify-between mb-4', className)}
{...props}
>
{children}
</div>
)
}
export function CardTitle({
children,
className,
...props
}: React.HTMLAttributes<HTMLHeadingElement>) {
return (
<h3
className={cn('text-base font-semibold text-white', className)}
{...props}
>
{children}
</h3>
)
}
export function CardBody({
children,
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) {
return (
<div className={cn('', className)} {...props}>
{children}
</div>
)
}
export function CardFooter({
children,
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) {
return (
<div
className={cn(
'mt-4 pt-4 border-t border-navy-700/50 flex items-center justify-between',
className,
)}
{...props}
>
{children}
</div>
)
}