File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ export default function createStyled(input = {}) {
7474 name : componentName ,
7575 slot : componentSlot ,
7676 skipVariantsResolver : inputSkipVariantsResolver ,
77+ skipSx : inputSkipSx ,
7778 overridesResolver,
7879 ...options
7980 } = inputOptions ;
@@ -84,6 +85,8 @@ export default function createStyled(input = {}) {
8485 ? inputSkipVariantsResolver
8586 : ( componentSlot && componentSlot !== 'Root' ) || false ;
8687
88+ const skipSx = inputSkipSx || false ;
89+
8790 let label ;
8891
8992 if ( process . env . NODE_ENV !== 'production' ) {
@@ -151,10 +154,12 @@ export default function createStyled(input = {}) {
151154 } ) ;
152155 }
153156
154- expressionsWithDefaultTheme . push ( ( props ) => {
155- const theme = isEmpty ( props . theme ) ? defaultTheme : props . theme ;
156- return styleFunctionSx ( { ...props , theme } ) ;
157- } ) ;
157+ if ( ! skipSx ) {
158+ expressionsWithDefaultTheme . push ( ( props ) => {
159+ const theme = isEmpty ( props . theme ) ? defaultTheme : props . theme ;
160+ return styleFunctionSx ( { ...props , theme } ) ;
161+ } ) ;
162+ }
158163
159164 const numOfCustomFnsApplied = expressionsWithDefaultTheme . length - expressions . length ;
160165
You can’t perform that action at this time.
0 commit comments