All files / src/components/ui card.tsx

100% Statements 12/12
100% Branches 0/0
100% Functions 6/6
100% Lines 12/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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            4x 2534x           4x 2534x     4x 2534x           4x 2x     4x 2534x     4x 2x        
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 Max Boksem. See NOTICE for additional terms under GPLv3 section 7.
 
import * as React from "react";
import { cn } from "@/lib/utils";
 
const Card = ({ className, ...props }: React.ComponentProps<"div">) => (
	<div
		className={cn("rounded-lg border bg-card text-card-foreground shadow-xs", className)}
		{...props}
	/>
);
 
const CardHeader = ({ className, ...props }: React.ComponentProps<"div">) => (
	<div className={cn("flex flex-col space-y-1.5 p-6", className)} {...props} />
);
 
const CardTitle = ({ className, ...props }: React.ComponentProps<"h3">) => (
	<h3
		className={cn("text-2xl font-semibold leading-none tracking-tight", className)}
		{...props}
	/>
);
 
const CardDescription = ({ className, ...props }: React.ComponentProps<"p">) => (
	<p className={cn("text-sm text-muted-foreground", className)} {...props} />
);
 
const CardContent = ({ className, ...props }: React.ComponentProps<"div">) => (
	<div className={cn("p-6 pt-0", className)} {...props} />
);
 
const CardFooter = ({ className, ...props }: React.ComponentProps<"div">) => (
	<div className={cn("flex items-center p-6 pt-0", className)} {...props} />
);
 
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };