)}
{/* Footer: Description */}
- {description && (
+ {description && (
{description}
@@ -188,8 +231,8 @@ export function RuleCardView({
description && (
- {description}
-
+ {description}
+
)
)}
diff --git a/lib/propNormalization.ts b/lib/propNormalization.ts
index 0c5d6de..9ebd610 100644
--- a/lib/propNormalization.ts
+++ b/lib/propNormalization.ts
@@ -519,10 +519,10 @@ export function normalizeSmallMediumLargeSize(
export function normalizeRuleCardSize(
value: string | undefined,
defaultValue: "L" = "L"
-): "L" | "M" {
+): "XS" | "S" | "M" | "L" {
if (!value) return defaultValue;
const normalized = value.toUpperCase();
- if (normalized === "L" || normalized === "M") {
+ if (normalized === "XS" || normalized === "S" || normalized === "M" || normalized === "L") {
return normalized;
}
return defaultValue;
diff --git a/stories/RuleCard.stories.js b/stories/RuleCard.stories.js
index a88b827..074fc19 100644
--- a/stories/RuleCard.stories.js
+++ b/stories/RuleCard.stories.js
@@ -39,7 +39,7 @@ export default {
},
size: {
control: { type: "select" },
- options: ["L", "M", "l", "m"],
+ options: ["XS", "S", "M", "L", "xs", "s", "m", "l"],
description: "Size variant of the card",
},
onClick: { action: "clicked" },
@@ -186,6 +186,44 @@ export const SizeMedium = {
},
};
+export const SizeSmall = {
+ args: {
+ title: "Consensus clusters",
+ description:
+ "Units called Circles have the ability to decide and act on matters in their domains, which their members agree on through a Council.",
+ backgroundColor: "bg-[var(--color-surface-default-brand-lime)]",
+ expanded: false,
+ size: "S",
+ icon: (
+
+ ),
+ },
+};
+
+export const SizeExtraSmall = {
+ args: {
+ title: "Consensus clusters",
+ description:
+ "Units called Circles have the ability to decide and act on matters in their domains, which their members agree on through a Council.",
+ backgroundColor: "bg-[var(--color-surface-default-brand-lime)]",
+ expanded: false,
+ size: "XS",
+ icon: (
+
+ ),
+ },
+};
+
export const ExpandedMedium = {
args: {
title: "Mutual Aid Mondays",