Skip to content

Commit

Permalink
[system] Fix duplicated styles in Box
Browse files Browse the repository at this point in the history
  • Loading branch information
iamxukai committed Aug 3, 2022
1 parent 35072a2 commit c0e3aa9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/mui-system/src/createBox.js
Expand Up @@ -11,7 +11,10 @@ export default function createBox(options = {}) {
generateClassName,
styleFunctionSx = defaultStyleFunctionSx,
} = options;
const BoxRoot = styled('div')(styleFunctionSx);
const BoxRoot = styled('div', {
shouldForwardProp: (prop) =>
prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as',
})(styleFunctionSx);

const Box = React.forwardRef(function Box(inProps, ref) {
const theme = useTheme(defaultTheme);
Expand Down

0 comments on commit c0e3aa9

Please sign in to comment.