blob: e1af13a9700edc029df6074295d8437f6f80152e (
plain)
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
|
import { ComponentPropsWithoutRef, Ref } from "react";
import classNames from "classnames";
import { ThemeColor } from "./common";
import "./Card.css";
interface CardProps extends ComponentPropsWithoutRef<"div"> {
containerRef?: Ref<HTMLDivElement>;
color?: ThemeColor;
}
export default function Card({
color,
className,
children,
containerRef,
...otherProps
}: CardProps) {
return (
<div
ref={containerRef}
className={classNames("cru-card", `cru-card-${color ?? "primary"}`, className)}
{...otherProps}
>
{children}
</div>
);
}
|