aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/views/common/Card.tsx
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2023-08-26 16:28:39 +0800
committercrupest <crupest@outlook.com>2023-08-26 16:28:39 +0800
commit1f90dd29a2e1a11cf16857513f14bce3df68c1e1 (patch)
tree4f044ae6ebf37014f33c37c5fee8bf9d37b4f3c7 /FrontEnd/src/views/common/Card.tsx
parent5284f38c002e5bf88e308e208456d41d4126b30e (diff)
downloadtimeline-1f90dd29a2e1a11cf16857513f14bce3df68c1e1.tar.gz
timeline-1f90dd29a2e1a11cf16857513f14bce3df68c1e1.tar.bz2
timeline-1f90dd29a2e1a11cf16857513f14bce3df68c1e1.zip
...
Diffstat (limited to 'FrontEnd/src/views/common/Card.tsx')
-rw-r--r--FrontEnd/src/views/common/Card.tsx9
1 files changed, 6 insertions, 3 deletions
diff --git a/FrontEnd/src/views/common/Card.tsx b/FrontEnd/src/views/common/Card.tsx
index fb29f728..a8f0d3cc 100644
--- a/FrontEnd/src/views/common/Card.tsx
+++ b/FrontEnd/src/views/common/Card.tsx
@@ -7,12 +7,14 @@ import "./Card.css";
interface CardProps extends ComponentPropsWithoutRef<"div"> {
containerRef?: Ref<HTMLDivElement>;
color?: ThemeColor;
- noBackground?: boolean;
+ border?: "color" | "none";
+ background?: "color" | "solid" | "grayscale" | "none";
}
export default function Card({
color,
- noBackground,
+ background,
+ border,
className,
children,
containerRef,
@@ -24,7 +26,8 @@ export default function Card({
className={classNames(
"cru-card",
`cru-card-${color ?? "primary"}`,
- noBackground && "cru-card-no-background",
+ `cru-card-border-${border ?? "color"}`,
+ `cru-card-background-${background ?? "solid"}`,
className,
)}
{...otherProps}