Skip to content

Commit

Permalink
Remove unused props
Browse files Browse the repository at this point in the history
  • Loading branch information
jtklein committed Sep 30, 2024
1 parent 0d6a2d3 commit c078bd7
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/app/components/LoadingButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const useStyles = makeStyles(theme => ({
position: 'relative',
},
progress: {
// color: green[500],
position: 'absolute',
top: '50%',
left: '50%',
Expand All @@ -22,8 +21,8 @@ const useStyles = makeStyles(theme => ({

function LoadingButton(props) {
const classes = useStyles();
const { loading, noDisabled, className, buttonClassName, progressProps = {}, ...buttonProps } = props;
const disabled = !noDisabled && (loading || buttonProps.disabled);
const { loading, className, ...buttonProps } = props;
const disabled = (loading || buttonProps.disabled);

return (
<div className={clsx(classes.wrapper, className)}>
Expand All @@ -41,7 +40,6 @@ function LoadingButton(props) {
<CircularProgress
size={24}
className={classes.progress}
{...progressProps}
/>
)}
</div>
Expand All @@ -52,14 +50,7 @@ LoadingButton.propTypes = {
className: PropTypes.string,
children: PropTypes.node,
loading: PropTypes.bool,
buttonClassName: PropTypes.string,
progressProps: PropTypes.object,
noDisabled: PropTypes.bool,
};

// LoadingButton.defaultProps = {
// buttonProps: {},
// progressProps: {},
// }

export default LoadingButton;

0 comments on commit c078bd7

Please sign in to comment.