11import { FC } from 'react' ;
22import {
3- ActionRow , Icon , ModalDialog , Stack ,
3+ ActionRow , AlertModal , Icon , ModalDialog , Stack ,
44 StatefulButton ,
55} from '@openedx/paragon' ;
66import { useIntl } from '@edx/frontend-platform/i18n' ;
@@ -26,37 +26,12 @@ const ConfirmDeletionModal: FC<ConfirmDeletionModalProps> = ({
2626} ) => {
2727 const intl = useIntl ( ) ;
2828 return (
29- < ModalDialog
29+ < AlertModal
3030 title = { intl . formatMessage ( messages [ 'library.authz.team.remove.user.modal.title' ] ) }
3131 isOpen = { isOpen }
3232 onClose = { close }
3333 size = "lg"
34- hasCloseButton
35- isFullscreenOnMobile
36- isOverflowVisible = { false }
37- >
38- < ModalDialog . Header >
39- < ModalDialog . Title className = "text-primary-500" >
40- { intl . formatMessage ( messages [ 'library.authz.team.remove.user.modal.title' ] ) }
41- </ ModalDialog . Title >
42- </ ModalDialog . Header >
43-
44- < ModalDialog . Body >
45- < Stack gap = { 3 } >
46- < p > { intl . formatMessage ( messages [ 'library.authz.team.remove.user.modal.body.1' ] , {
47- userName : context . userName ,
48- scope : context . scope ,
49- role : context . role ,
50- } ) }
51- </ p >
52- { context . rolesCount === 1 && (
53- < p > { intl . formatMessage ( messages [ 'library.authz.team.remove.user.modal.body.2' ] ) } </ p >
54- ) }
55- < p > { intl . formatMessage ( messages [ 'library.authz.team.remove.user.modal.body.3' ] ) } </ p >
56- </ Stack >
57- </ ModalDialog . Body >
58-
59- < ModalDialog . Footer >
34+ footerNode = { (
6035 < ActionRow >
6136 < ModalDialog . CloseButton variant = "tertiary" >
6237 { intl . formatMessage ( messages [ 'libraries.authz.manage.cancel.button' ] ) }
@@ -65,8 +40,8 @@ const ConfirmDeletionModal: FC<ConfirmDeletionModalProps> = ({
6540 className = "px-4"
6641 variant = "danger"
6742 labels = { {
68- default : intl . formatMessage ( messages [ 'libraries.authz.manage.save .button' ] ) ,
69- pending : intl . formatMessage ( messages [ 'libraries.authz.manage.saving .button' ] ) ,
43+ default : intl . formatMessage ( messages [ 'libraries.authz.manage.remove .button' ] ) ,
44+ pending : intl . formatMessage ( messages [ 'libraries.authz.manage.removing .button' ] ) ,
7045 } }
7146 icons = { {
7247 pending : < Icon src = { SpinnerSimple } /> ,
@@ -76,8 +51,23 @@ const ConfirmDeletionModal: FC<ConfirmDeletionModalProps> = ({
7651 disabledStates = { [ 'pending' ] }
7752 />
7853 </ ActionRow >
79- </ ModalDialog . Footer >
80- </ ModalDialog >
54+ ) }
55+ isOverflowVisible = { false }
56+ >
57+ < Stack gap = { 3 } >
58+ < p > { intl . formatMessage ( messages [ 'library.authz.team.remove.user.modal.body.1' ] , {
59+ userName : context . userName ,
60+ scope : context . scope ,
61+ role : context . role ,
62+ } ) }
63+ </ p >
64+ { context . rolesCount === 1 && (
65+ < p > { intl . formatMessage ( messages [ 'library.authz.team.remove.user.modal.body.2' ] ) } </ p >
66+ ) }
67+ < p > { intl . formatMessage ( messages [ 'library.authz.team.remove.user.modal.body.3' ] ) } </ p >
68+ </ Stack >
69+
70+ </ AlertModal >
8171 ) ;
8272} ;
8373
0 commit comments