Skip to content

Commit

Permalink
[@mantine/core] Fix typo in code (#2035)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuhangyeong committed Aug 12, 2022
1 parent f859a34 commit 12c4556
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ const SYSTEM_PROPS = {

const NEGATIVE_VALUES = ['-xs', '-sm', '-md', '-lg', '-xl'];

function isValidSizeValue(margin: any) {
return typeof margin === 'string' || typeof margin === 'number';
function isValidSizeValue(size: any) {
return typeof size === 'string' || typeof size === 'number';
}

function getSizeValue(margin: any, theme: MantineTheme) {
if (NEGATIVE_VALUES.includes(margin)) {
return theme.fn.size({ size: margin.replace('-', ''), sizes: theme.spacing }) * -1;
function getSizeValue(size: any, theme: MantineTheme) {
if (NEGATIVE_VALUES.includes(size)) {
return theme.fn.size({ size: size.replace('-', ''), sizes: theme.spacing }) * -1;
}

return theme.fn.size({ size: margin, sizes: theme.spacing });
return theme.fn.size({ size, sizes: theme.spacing });
}

export function getSystemStyles(systemStyles: MantineStyleSystemProps, theme: MantineTheme) {
Expand Down

0 comments on commit 12c4556

Please sign in to comment.