Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
sai6855 committed Sep 19, 2023
1 parent 465ec51 commit 999e3d0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/mui-joy/src/styles/styleUtils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { CssVarsValuesType } from '../CircularProgress/CircularProgressCssVars';
import { Theme, SxProps } from './types';

/**
Expand All @@ -16,10 +17,10 @@ export const resolveSxValue = <K extends string>(
keys: K[],
): Record<K, undefined | number | string> => {
let sxObject: Record<string, any> = {};
function resolveSx(sxProp: SxProps) {
function resolveSx(sxProp: SxProps & CssVarsValuesType) {
if (typeof sxProp === 'function') {
const result = sxProp(theme);
resolveSx(result);
resolveSx(result as SxProps & CssVarsValuesType);
} else if (Array.isArray(sxProp)) {
sxProp.forEach((sxItem) => {
if (typeof sxItem !== 'boolean') {
Expand Down

0 comments on commit 999e3d0

Please sign in to comment.