[IMPROVE] Rewrite Save Encryption Password Modal (#22447)
* improve: rewrite modal * fix: translation keys * fix: review * fix: lint Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com> Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat>pull/22606/head
parent
6357447c35
commit
22ffa7f34b
@ -0,0 +1,33 @@ |
||||
import { Box } from '@rocket.chat/fuselage'; |
||||
import React, { ReactElement } from 'react'; |
||||
|
||||
import GenericModal from '../../../client/components/GenericModal'; |
||||
import { useTranslation } from '../../../client/contexts/TranslationContext'; |
||||
|
||||
const SaveE2EPasswordModal = ({ |
||||
passwordRevealText, |
||||
onClose, |
||||
onCancel, |
||||
onConfirm, |
||||
}: { |
||||
passwordRevealText: string; |
||||
onClose: () => void; |
||||
onCancel: () => void; |
||||
onConfirm: () => void; |
||||
}): ReactElement => { |
||||
const t = useTranslation(); |
||||
|
||||
return ( |
||||
<GenericModal |
||||
onClose={onClose} |
||||
onCancel={onCancel} |
||||
onConfirm={onConfirm} |
||||
cancelText={t('Do_It_Later')} |
||||
confirmText={t('I_Saved_My_Password')} |
||||
variant='warning' |
||||
title={t('Save_Your_Encryption_Password')} |
||||
><Box dangerouslySetInnerHTML={{ __html: passwordRevealText }} /></GenericModal> |
||||
); |
||||
}; |
||||
|
||||
export default SaveE2EPasswordModal; |
||||
Loading…
Reference in new issue