-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Austenem/CAT-1052 Add bulk download dialog to detail pages (#3622)
* add bulk file download to dataset detail page * pass in uuids * update description link * add changelog * clean up * adjust outlined button component
- Loading branch information
Showing
17 changed files
with
71 additions
and
23 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 @@ | ||
- Add bulk file download option to the Bulk Download section of dataset detail pages. |
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...omSearch/BulkDownloadButtonFromSearch.tsx → ...omSearch/BulkDownloadButtonFromSearch.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
File renamed without changes.
24 changes: 24 additions & 0 deletions
24
...atic/js/components/bulkDownload/buttons/BulkDownloadTextButton/BulkDownloadTextButton.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,24 @@ | ||
import React from 'react'; | ||
import Box from '@mui/material/Box'; | ||
import { ButtonProps } from '@mui/material/Button'; | ||
import { useBulkDownloadDialog } from 'js/components/bulkDownload/hooks'; | ||
import BulkDownloadDialog from 'js/components/bulkDownload/BulkDownloadDialog'; | ||
import OutlinedButton from 'js/shared-styles/buttons/OutlinedButton'; | ||
|
||
interface BulkDownloadTextButtonProps extends ButtonProps { | ||
uuids: Set<string>; | ||
} | ||
function BulkDownloadTextButton({ uuids, ...rest }: BulkDownloadTextButtonProps) { | ||
const { openDialog, isOpen } = useBulkDownloadDialog(); | ||
|
||
return ( | ||
<Box> | ||
<OutlinedButton color="primary" onClick={() => openDialog(uuids)} {...rest}> | ||
Download Files with HuBMAP CLT | ||
</OutlinedButton> | ||
{isOpen && <BulkDownloadDialog />} | ||
</Box> | ||
); | ||
} | ||
|
||
export default BulkDownloadTextButton; |
3 changes: 3 additions & 0 deletions
3
context/app/static/js/components/bulkDownload/buttons/BulkDownloadTextButton/index.ts
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,3 @@ | ||
import BulkDownloadTextButton from './BulkDownloadTextButton'; | ||
|
||
export default BulkDownloadTextButton; |
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
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
3 changes: 3 additions & 0 deletions
3
context/app/static/js/shared-styles/buttons/OutlinedButton/index.ts
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,3 @@ | ||
import OutlinedButton from './style'; | ||
|
||
export default OutlinedButton; |
10 changes: 10 additions & 0 deletions
10
context/app/static/js/shared-styles/buttons/OutlinedButton/style.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,10 @@ | ||
import React from 'react'; | ||
import { styled } from '@mui/material/styles'; | ||
import Button, { ButtonProps } from '@mui/material/Button'; | ||
|
||
const OutlinedButton = styled((props: ButtonProps) => <Button {...props} variant="outlined" />)(({ theme }) => ({ | ||
borderColor: theme.palette.grey[300], | ||
borderRadius: theme.spacing(0.5), | ||
})) as typeof Button; | ||
|
||
export default OutlinedButton; |
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
9 changes: 0 additions & 9 deletions
9
context/app/static/js/shared-styles/buttons/OutlinedLinkButton/style.ts
This file was deleted.
Oops, something went wrong.