Skip to content

Commit

Permalink
PORTALS-2837: Add Close button to Access Requirement List when render…
Browse files Browse the repository at this point in the history
…ed as a modal
  • Loading branch information
jay-hodgson committed Oct 27, 2023
1 parent dfa9d74 commit 739a019
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import DataAccessRequestAccessorsFilesForm from './ManagedACTAccessRequirementRe
import RequestDataAccessSuccess from './ManagedACTAccessRequirementRequestFlow/RequestDataAccessSuccess'
import {
Box,
Button,
Dialog,
DialogContent,
DialogTitle,
Expand All @@ -41,6 +42,7 @@ import TwoFactorAuthEnabledRequirement from './RequirementItem/TwoFactorAuthEnab
import { AccessRequirementListItem } from './AccessRequirementListItem'
import { useSynapseContext } from '../../utils/context/SynapseContext'
import { useCanShowManagedACTWikiInWizard } from './AccessRequirementListUtils'
import { DialogActions } from '@mui/material'

export type AccessRequirementListProps = {
entityId: string // will show this entity info
Expand Down Expand Up @@ -369,10 +371,17 @@ export default function AccessRequirementList(
renderContent = <RequestDataAccessSuccess onHide={onHide} />
break
case RequestDataStep.SHOW_ALL_ARS:
renderContent = content
break
default:
renderContent = content
renderContent = (
<>
{content}
<DialogActions>
<Button variant="contained" onClick={onHide}>
Close
</Button>
</DialogActions>
</>
)
}
return (
<Dialog maxWidth={dialogWidth} fullWidth open={true} onClose={onHide}>
Expand Down

0 comments on commit 739a019

Please sign in to comment.