diff --git a/package-lock.json b/package-lock.json index 810487f..2a5d8ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@atatctech/mui-presets", - "version": "1.0.2", + "version": "1.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@atatctech/mui-presets", - "version": "1.0.2", + "version": "1.0.3", "license": "The Apache License, Version 2.0", "dependencies": { "@mui/icons-material": "^5.14.1", diff --git a/package.json b/package.json index d3075d6..edbeb49 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@atatctech/mui-presets", "type": "module", - "version": "1.0.2", + "version": "1.0.3", "author": "ATATC", "description": "Additional preset components for MUI.", "keywords": [ diff --git a/src/types.js b/src/types.js index 4621b27..13516fa 100644 --- a/src/types.js +++ b/src/types.js @@ -36,6 +36,9 @@ export function expandPaddingKeys(props) { * @param props */ export function expandAllKeys(props) { - return expandPaddingKeys(expandMarginKeys(props)); + return { + ...expandMarginKeys(props), + ...expandPaddingKeys(props) + }; } //# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/src/types.js.map b/src/types.js.map index 9da0a76..bb1e814 100644 --- a/src/types.js.map +++ b/src/types.js.map @@ -1 +1 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAwBA;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAA4B;IACzD,OAAO;QACH,MAAM,EAAE,KAAK,EAAE,CAAC;QAChB,SAAS,EAAE,KAAK,EAAE,EAAE;QACpB,YAAY,EAAE,KAAK,EAAE,EAAE;QACvB,UAAU,EAAE,KAAK,EAAE,EAAE;QACrB,WAAW,EAAE,KAAK,EAAE,EAAE;QACtB,OAAO,EAAE,KAAK,EAAE,EAAE;QAClB,OAAO,EAAE,KAAK,EAAE,EAAE;KACrB,CAAC;AACN,CAAC;AAmBD;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAA4B;IAC1D,OAAO;QACH,OAAO,EAAE,KAAK,E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;QAC1B,GAAG,iBAAiB,CAAC,KAAK,CAAC;KAC9B,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/src/types.ts b/src/types.ts index 29a9afd..4ea4c52 100644 --- a/src/types.ts +++ b/src/types.ts @@ -81,6 +81,9 @@ export type PropsWithMarginAndPaddingF = PropsWithMarginF & PropsWithPaddingF; * @param props */ export function expandAllKeys(props: PropsWithMarginAndPadding | any): PropsWithMarginAndPaddingF { - return expandPaddingKeys(expandMarginKeys(props)); + return { + ...expandMarginKeys(props), + ...expandPaddingKeys(props) + }; } export type DefaultProps = PropsWithChildren & PropsWithMarginAndPadding; \ No newline at end of file