Skip to content

Commit

Permalink
Intercept props and ownerState ownerState key
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoAndai committed May 23, 2024
1 parent 9a88575 commit 65622f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mui-system/src/createStyled/createStyled.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function processStyleArg(callableStyle, { ownerState, ...props }) {
variants.forEach((variant) => {
let isMatch = true;
if (typeof variant.props === 'function') {
isMatch = variant.props({ ownerState, ...props, ...ownerState });
isMatch = variant.props({ ...props, ...ownerState, ownerState });
} else {
Object.keys(variant.props).forEach((key) => {
if (ownerState?.[key] !== variant.props[key] && props[key] !== variant.props[key]) {
Expand Down

0 comments on commit 65622f2

Please sign in to comment.