Skip to content

Commit

Permalink
follow Button composedClasses
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed May 20, 2021
1 parent e3e30d7 commit c8dffd8
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/material-ui-lab/src/LoadingButton/LoadingButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ const useUtilityClasses = (styleProps) => {
],
};

return composeClasses(slots, getLoadingButtonUtilityClass, classes);
const composedClasse = composeClasses(slots, getLoadingButtonUtilityClass, classes);

return {
...classes,
...composedClasse,
};
};

// TODO use `import { rootShouldForwardProp } from '../styles/experimentalStyled';` once move to core
Expand Down Expand Up @@ -123,15 +128,13 @@ const LoadingButton = React.forwardRef(function LoadingButton(inProps, ref) {
};

const classes = useUtilityClasses(styleProps);

return (
<LoadingButtonRoot
disabled={disabled || loading}
ref={ref}
{...other}
classes={{
...props.classes,
...classes,
}}
classes={classes}
styleProps={styleProps}
>
{loading && (
Expand Down

0 comments on commit c8dffd8

Please sign in to comment.