feat: add image opening functionality to DownloadActionBar (#725)
* feat: add image opening functionality to DownloadActionBar and Share components --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -14,6 +14,7 @@ interface Props {
|
||||
onDownload: () => void
|
||||
onUpdateFeed: () => void
|
||||
hasIndexDocument: boolean
|
||||
isImage: boolean
|
||||
loading: boolean
|
||||
}
|
||||
|
||||
@@ -23,6 +24,7 @@ export function DownloadActionBar({
|
||||
onDownload,
|
||||
onUpdateFeed,
|
||||
hasIndexDocument,
|
||||
isImage,
|
||||
loading,
|
||||
}: Props): ReactElement {
|
||||
return (
|
||||
@@ -33,6 +35,11 @@ export function DownloadActionBar({
|
||||
View Website
|
||||
</SwarmButton>
|
||||
)}
|
||||
{isImage && (
|
||||
<SwarmButton onClick={onOpen} iconType={Link} disabled={loading}>
|
||||
Open Image
|
||||
</SwarmButton>
|
||||
)}
|
||||
<SwarmButton onClick={onDownload} iconType={Download} disabled={loading} loading={loading}>
|
||||
Download
|
||||
</SwarmButton>
|
||||
|
||||
Reference in New Issue
Block a user