Skip to content

Commit e33f31a

Browse files
add card components; rerun ability with parameters
1 parent 6bb2913 commit e33f31a

14 files changed

+1259
-391
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import { type ReactNode } from 'react'
2+
import { twColors, twMerge } from './tailwind-utils'
3+
4+
interface CardProps {
5+
children: ReactNode
6+
className?: string
7+
}
8+
9+
export function Card({ children, className }: CardProps) {
10+
return (
11+
<div
12+
className={twMerge(
13+
'rounded-xl shadow-sm border overflow-hidden',
14+
twColors.bgEditor,
15+
twColors.borderNeutral100,
16+
className,
17+
)}
18+
>
19+
{children}
20+
</div>
21+
)
22+
}
23+
24+
interface CardHeaderProps {
25+
children: ReactNode
26+
className?: string
27+
}
28+
29+
export function CardHeader({ children, className }: CardHeaderProps) {
30+
return (
31+
<div
32+
className={twMerge(
33+
'px-6 py-4 border-b',
34+
twColors.bgNeutral10,
35+
twColors.borderNeutral100,
36+
className,
37+
)}
38+
>
39+
{children}
40+
</div>
41+
)
42+
}
43+
44+
interface CardContentProps {
45+
children: ReactNode
46+
className?: string
47+
}
48+
49+
export function CardContent({ children, className }: CardContentProps) {
50+
return <div className={twMerge('px-6 py-4', className)}>{children}</div>
51+
}

0 commit comments

Comments
 (0)