Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the safety number viewer into modal
- Loading branch information
1 parent
8c34d6e
commit 048e1e4
Showing
14 changed files
with
132 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright 2021 Signal Messenger, LLC | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
import React from 'react'; | ||
import { Modal } from './Modal'; | ||
import { | ||
SafetyNumberViewer, | ||
PropsType as SafetyNumberViewerPropsType, | ||
} from './SafetyNumberViewer'; | ||
|
||
type PropsType = { | ||
toggleSafetyNumberModal: () => unknown; | ||
} & SafetyNumberViewerPropsType; | ||
|
||
export const SafetyNumberModal = ({ | ||
i18n, | ||
toggleSafetyNumberModal, | ||
...safetyNumberViewerProps | ||
}: PropsType): JSX.Element | null => { | ||
return ( | ||
<Modal | ||
hasXButton | ||
i18n={i18n} | ||
moduleClassName="module-SafetyNumberViewer__modal" | ||
onClose={() => toggleSafetyNumberModal()} | ||
title={i18n('SafetyNumberModal__title')} | ||
> | ||
<SafetyNumberViewer i18n={i18n} {...safetyNumberViewerProps} /> | ||
</Modal> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.