Skip to content

Commit

Permalink
[docs] Update transform function in the sx prop sizing docs (mui#33850)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeeshanTamboli authored and Daniel Rabe committed Nov 29, 2022
1 parent 5f3c717 commit dba8601
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -108,7 +108,7 @@ The sizing properties `width`, `height`, `minHeight`, `maxHeight`, `minWidth`, a

```js
function transform(value) {
return value <= 1 ? `${value * 100}%` : value;
return value <= 1 && value !== 0 ? `${value * 100}%` : value;
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/data/system/sizing/sizing.md
Expand Up @@ -8,7 +8,7 @@ The sizing properties: `width`, `height`, `minHeight`, `maxHeight`, `minWidth`,

```js
function transform(value) {
return value <= 1 ? `${value * 100}%` : value;
return value <= 1 && value !== 0 ? `${value * 100}%` : value;
}
```

Expand Down

0 comments on commit dba8601

Please sign in to comment.