Merge pull request #97 from aldreth/main

Fix clampGenerator when max and min are equal
This commit is contained in:
Lene Saile 2025-07-06 12:25:47 +02:00 committed by GitHub
commit a7d9cab9ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,7 +18,7 @@ export const clampGenerator = tokens => {
return tokens.map(({name, min, max}) => {
if (min === max) {
return `${min / rootSize}rem`;
return {name, value:`${min / rootSize}rem`};
}
// Convert the min and max sizes to rems