Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Aug 22, 2024
1 parent 5653111 commit 17784e9
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions packages/mui-material/src/styles/createThemeWithVars.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,11 @@ function getSpacingVal(spacingInput) {
if (typeof spacingInput === 'number') {
return `${spacingInput}px`;
}
if (typeof spacingInput === 'string') {
return spacingInput;
}
if (typeof spacingInput === 'function') {
return spacingInput;
}
if (Array.isArray(spacingInput)) {
if (
typeof spacingInput === 'string' ||
typeof spacingInput === 'function' ||
Array.isArray(spacingInput)
) {
return spacingInput;
}
return '8px';
Expand Down

0 comments on commit 17784e9

Please sign in to comment.