Skip to content

Commit

Permalink
Unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
jtklein committed Sep 30, 2024
1 parent c078bd7 commit a9cca76
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 34 deletions.
3 changes: 0 additions & 3 deletions src/app/AlignmentCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ import Chip from '@mui/material/Chip';
import Switch from '@mui/material/Switch';
import Menu from '@mui/material/Menu';
import MenuItem from '@mui/material/MenuItem';
import FormControl from '@mui/material/FormControl';
import FormControlLabel from '@mui/material/FormControlLabel';
import InputLabel from '@mui/material/InputLabel';
import Select from '@mui/material/Select';
import Tooltip from '@mui/material/Tooltip';
import Card from '@mui/material/Card';
import CardHeader from '@mui/material/CardHeader';
Expand Down
44 changes: 14 additions & 30 deletions src/app/components/LoadingButton.js
Original file line number Diff line number Diff line change
@@ -1,48 +1,32 @@
import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { makeStyles } from '@mui/styles';
import Button from '@mui/material/Button';
import CircularProgress from '@mui/material/CircularProgress';

const useStyles = makeStyles(theme => ({
wrapper: {
position: 'relative',
},
progress: {
position: 'absolute',
top: '50%',
left: '50%',
marginTop: -12,
marginLeft: -12,
pointerEvents: 'none',
},
}));
import { Box } from '@mui/material';

function LoadingButton(props) {
const classes = useStyles();
const { loading, className, ...buttonProps } = props;
const { loading, ...buttonProps } = props;
const disabled = (loading || buttonProps.disabled);

return (
<div className={clsx(classes.wrapper, className)}>
<Box sx={{ position: 'relative' }}>
<Button
variant="contained"
disabled={disabled}
classes={{
root: classes.primaryButton,
}}
{...buttonProps}
>
{ props.children }
{props.children}
</Button>
{loading && (
<CircularProgress
size={24}
className={classes.progress}
/>
)}
</div>
{loading && <CircularProgress size={24} sx={{
position: 'absolute',
top: '50%',
left: '50%',
marginTop: -12,
marginLeft: -12,
pointerEvents: 'none',
}}
/>}
</Box>
);
}

Expand Down
1 change: 0 additions & 1 deletion src/app/components/OptionSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const OptionSelect = observer(({ option, className }) => {
return (
<FormControl variant="standard" className={className} title={option.hoverInfo}>
<Select
variant="standard"
value={option.value}
onChange={(e) => option.setValue(e.target.value)}
inputProps={{
Expand Down

0 comments on commit a9cca76

Please sign in to comment.