All files / src/theme/ui/overrides/components loading-button.jsx

75% Statements 3/4
0% Branches 0/4
50% Functions 1/2
75% Lines 3/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 3010x 10x     91x                                                  
const loadingIndicatorStart = "MuiLoadingButton-loadingIndicatorStart";
const loadingIndicatorEnd = "MuiLoadingButton-loadingIndicatorEnd";
 
export function loadingButton() {
    return {
        MuiLoadingButton: {
            styleOverrides: {
                root: ({ ownerState }) => ({
                    ...(ownerState.variant === "soft" && {
                        [`& .${loadingIndicatorStart}`]: {
                            left: 10,
                        },
                        [`& .${loadingIndicatorEnd}`]: {
                            right: 14,
                        },
                        ...(ownerState.size === "small" && {
                            [`& .${loadingIndicatorStart}`]: {
                                left: 10,
                            },
                            [`& .${loadingIndicatorEnd}`]: {
                                right: 10,
                            },
                        }),
                    }),
                }),
            },
        },
    };
}