Update Rule Card component

This commit is contained in:
adilallo
2026-02-04 21:19:27 -07:00
parent 3db151b40c
commit 769fc8e7c6
7 changed files with 584 additions and 243 deletions
+15
View File
@@ -512,3 +512,18 @@ export function normalizeSmallMediumLargeSize(
}
return defaultValue;
}
/**
* Normalize RuleCard size prop values (L/M -> l/m -> L/M)
*/
export function normalizeRuleCardSize(
value: string | undefined,
defaultValue: "L" = "L"
): "L" | "M" {
if (!value) return defaultValue;
const normalized = value.toUpperCase();
if (normalized === "L" || normalized === "M") {
return normalized;
}
return defaultValue;
}