● Zion Boggan
repos/Drophawk/frontend/components/ui/card.tsx
zionboggan.com ↗
34 lines · tsx
History for this file →
1
import * as React from "react";
2
import { cn } from "@/lib/utils";
3
 
4
export function Card({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {
5
  return (
6
    <div
7
      className={cn(
8
        "rounded-[var(--radius-lg)] border border-[var(--color-border-subtle)] bg-[var(--color-bg-elevated)]",
9
        className,
10
      )}
11
      {...props}
12
    />
13
  );
14
}
15
 
16
export function CardHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {
17
  return <div className={cn("flex items-center justify-between gap-3 px-4 pt-4", className)} {...props} />;
18
}
19
 
20
export function CardTitle({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>) {
21
  return (
22
    <h3
23
      className={cn(
24
        "text-sm font-semibold tracking-[var(--tracking-tight)] text-[var(--color-fg-primary)]",
25
        className,
26
      )}
27
      {...props}
28
    />
29
  );
30
}
31
 
32
export function CardBody({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {
33
  return <div className={cn("p-4", className)} {...props} />;
34
}