Implement S and XS Rule Card

This commit is contained in:
adilallo
2026-02-05 14:18:30 -07:00
parent fc5933e6ba
commit 7e2348048a
5 changed files with 132 additions and 51 deletions
+2 -2
View File
@@ -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;