aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/views/common/Card.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'FrontEnd/src/views/common/Card.tsx')
-rw-r--r--FrontEnd/src/views/common/Card.tsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/FrontEnd/src/views/common/Card.tsx b/FrontEnd/src/views/common/Card.tsx
index 5ff89b61..35e605af 100644
--- a/FrontEnd/src/views/common/Card.tsx
+++ b/FrontEnd/src/views/common/Card.tsx
@@ -1,22 +1,26 @@
import { ComponentPropsWithoutRef, Ref } from "react";
import classNames from "classnames";
+import { ThemeColor } from "./common";
import "./Card.css";
interface CardProps extends ComponentPropsWithoutRef<"div"> {
- containerRef?: Ref<HTMLDivElement> | null;
+ containerRef?: Ref<HTMLDivElement>;
+ color?: ThemeColor;
}
export default function Card({
+ color,
className,
children,
containerRef,
...otherProps
}: CardProps) {
+ color = color ?? "primary";
return (
<div
ref={containerRef}
- className={classNames("cru-card", className)}
+ className={classNames("cru-card", `cru-${color}`, className)}
{...otherProps}
>
{children}