-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Antoine MAZEAS <[email protected]>
- Loading branch information
1 parent
e7a0b38
commit 937f02b
Showing
3 changed files
with
68 additions
and
20 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
30 changes: 30 additions & 0 deletions
30
openbas-front/src/admin/components/common/injects/InjectImportJsonDialog.tsx
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,30 @@ | ||
import Dialog from '../../../../components/common/Dialog'; | ||
import { useFormatter } from '../../../../components/i18n'; | ||
import ImportFileSelector from './ImportFileSelector'; | ||
|
||
interface ImportJsonDialogProps { | ||
open: boolean; | ||
handleClose: () => void; | ||
handleSubmit: (values: { file: File }) => void; | ||
} | ||
const InjectImportJsonDialog = (props: ImportJsonDialogProps) => { | ||
const { t } = useFormatter(); | ||
|
||
return ( | ||
<Dialog | ||
open={props.open} | ||
handleClose={props.handleClose} | ||
title={t('Import injects')} | ||
maxWidth="sm" | ||
> | ||
<ImportFileSelector | ||
label={t('inject_import_file_must_be_zip')} | ||
mimeTypes="application/octet-stream, multipart/x-zip, application/zip, application/zip-compressed, application/x-zip-compressed" | ||
handleClose={props.handleClose} | ||
handleSubmit={props.handleSubmit} | ||
/> | ||
</Dialog> | ||
); | ||
}; | ||
|
||
export default InjectImportJsonDialog; |
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