fix: add table styling

This commit is contained in:
Arvid Norlin
2024-06-03 14:51:25 +02:00
parent 92f5f7f7c0
commit 349c95fbc4
7 changed files with 126 additions and 61 deletions
@@ -0,0 +1,19 @@
.benefitValueContainer {
display: flex;
flex-direction: column;
align-items: center;
gap: var(--Spacing-x-one-and-half);
}
.benefitValue {
background-color: var(--Main-Brand-Burgundy);
border-radius: var(--Corner-radius-xLarge);
color: var(--Base-Surface-Primary-Hover-alt, #fff);
font-size: var(--typography-Footnote-Regular-fontSize);
padding: var(--Spacing-x-half) var(--Spacing-x1);
}
.benefitValueDetails {
font-size: var(--typography-Footnote-Regular-fontSize);
text-align: center;
}
@@ -0,0 +1,26 @@
import { Minus } from "react-feather"
import CheckCircle from "@/components/Icons/CheckCircle"
import styles from "./benefitValue.module.css"
import { BenefitValueProps } from "@/types/components/loyalty/blocks"
export default function BenefitValue({ benefit }: BenefitValueProps) {
if (!benefit.unlocked) {
return <Minus />
}
if (!benefit.value) {
return <CheckCircle height={32} width={32} />
}
return (
<div className={styles.benefitValueContainer}>
<span className={styles.benefitValue}>{benefit.value}</span>
{benefit.valueDetails && (
<span className={styles.benefitValueDetails}>
{benefit.valueDetails}
</span>
)}
</div>
)
}