Skip to content

Commit 65622f2

Browse files
committed
Intercept props and ownerState ownerState key
1 parent 9a88575 commit 65622f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/mui-system/src/createStyled/createStyled.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function processStyleArg(callableStyle, { ownerState, ...props }) {
6666
variants.forEach((variant) => {
6767
let isMatch = true;
6868
if (typeof variant.props === 'function') {
69-
isMatch = variant.props({ ownerState, ...props, ...ownerState });
69+
isMatch = variant.props({ ...props, ...ownerState, ownerState });
7070
} else {
7171
Object.keys(variant.props).forEach((key) => {
7272
if (ownerState?.[key] !== variant.props[key] && props[key] !== variant.props[key]) {

0 commit comments

Comments
 (0)