added download button

This commit is contained in:
Abhinav-grd 2021-02-15 13:44:33 +05:30
parent 9169e068d1
commit 2d156859d1
3 changed files with 18 additions and 5 deletions

BIN
public/download_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

View file

@ -149,12 +149,15 @@ function PhotoSwipe(props: Iprops) {
<button
className="pswp__button pswp__button--close"
title="Share"
/>
<button
className="pswp__button pswp__button--share"
title="Share"
title="Close"
/>
<a
download={photoSwipe?.currItem['metadata']['title']}
href={photoSwipe?.currItem.msrc}
>
<button className="download-btn" title="Download" />
</a>
<button
className="pswp__button pswp__button--fs"
title="Toggle fullscreen"

View file

@ -105,6 +105,16 @@ const GlobalStyles = createGlobalStyle`
background-color:#303030 !important;
color:#aaa;
}
.download-btn{
margin-top:10px;
width: 25px;
height: 25px;
float: right;
background: url('/download_icon.png') no-repeat;
cursor: pointer;
background-size: cover;
border: none;
}
`;
const Image = styled.img`