-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update add software UI to move software package modal into new tabbed…
… layout (#22553) Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com>
- Loading branch information
1 parent
83c44b9
commit 3727474
Showing
27 changed files
with
509 additions
and
240 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Update UI for software uploads to include upload progress bar. |
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
41 changes: 41 additions & 0 deletions
41
frontend/components/FileProgressModal/FileProgressModal.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,41 @@ | ||
import Card from "components/Card"; | ||
import FileDetails from "components/FileDetails"; | ||
import Modal from "components/Modal"; | ||
import { noop } from "lodash"; | ||
import React from "react"; | ||
|
||
import { ISupportedGraphicNames } from "components/FileUploader/FileUploader"; | ||
|
||
import { IFileDetails } from "utilities/file/fileUtils"; | ||
|
||
const baseClass = "file-progress-modal"; | ||
|
||
const FileProgressModal = ({ | ||
graphicNames = "file-pkg", | ||
fileDetails, | ||
fileProgress, | ||
}: { | ||
graphicNames?: ISupportedGraphicNames | ISupportedGraphicNames[]; | ||
fileDetails: IFileDetails; | ||
fileProgress: number; | ||
}) => ( | ||
<Modal | ||
className={baseClass} | ||
title="Add software" | ||
width="large" | ||
onExit={noop} | ||
disableClosingModal | ||
> | ||
<Card color="gray" className={`${baseClass}__card`}> | ||
<FileDetails | ||
graphicNames={graphicNames} | ||
fileDetails={fileDetails} | ||
progress={fileProgress} | ||
canEdit={false} | ||
onFileSelect={noop} | ||
/> | ||
</Card> | ||
</Modal> | ||
); | ||
|
||
export default FileProgressModal; |
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,7 @@ | ||
.file-progress-modal { | ||
// TODO: should we update the card component with this padding option? | ||
&__card { | ||
padding-top: $pad-medium; | ||
padding-bottom: $pad-medium; | ||
} | ||
} |
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 @@ | ||
export { default } from "./FileProgressModal"; |
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.