Implement S and XS Rule Card
This commit is contained in:
1 parent
fc5933e6ba
commit
7e2348048a
5 files changed
+132
-51
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user