Skip to content

Commit

Permalink
Merge pull request #3827 from ProjectMirador/mui5-dialog
Browse files Browse the repository at this point in the history
Create a Dialog variant to contain a  modal within a mirador window
  • Loading branch information
jcoyne authored Nov 29, 2023
2 parents 101d3ba + e383dcd commit c938312
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
20 changes: 2 additions & 18 deletions src/components/CollectionDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,10 @@ export class CollectionDialog extends Component {
placeholder() {
return (
<Dialog
sx={{
position: 'absolute !important',
}}
variant="contained"
onClose={this.hideDialog}
open
container={this.dialogContainer()}
slotProps={{
backdrop: {
sx: {
position: 'absolute !important',
},
},
}}
>
<DialogTitle id="select-collection">
<Skeleton variant="text" />
Expand Down Expand Up @@ -186,16 +177,9 @@ export class CollectionDialog extends Component {

return (
<Dialog
sx={{ position: 'absolute !important' }}
variant="contained"
onClose={this.hideDialog}
container={this.dialogContainer()}
slotProps={{
backdrop: {
sx: {
position: 'absolute !important',
},
},
}}
open
>
<DialogTitle id="select-collection">
Expand Down
13 changes: 13 additions & 0 deletions src/config/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,19 @@ export default {
disableTouchRipple: true,
},
},
MuiDialog: {
variants: [
{
props: { variant: 'contained' },
style: {
position: 'absolute',
'& .MuiBackdrop-root': {
position: 'absolute'
}
},
}
]
},
MuiLink: {
defaultProps: {
underline: 'always'
Expand Down

0 comments on commit c938312

Please sign in to comment.