@corejam/core-components
Version:
Corejam - Core Components
10 lines (9 loc) • 327 B
text/typescript
export default {
property: "column-rule-width",
transform(value: string) {
const valids = ["thin", "medium", "thick"];
const numerics = value.includes("em") || value.includes("rem") || value.includes("px");
if (valids.includes(value) || numerics) return value;
throw new Error("No valid property");
},
};