added download button
This commit is contained in:
parent
9169e068d1
commit
2d156859d1
BIN
public/download_icon.png
Normal file
BIN
public/download_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 214 KiB |
|
@ -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"
|
||||
|
|
|
@ -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`
|
||||
|
|
Loading…
Reference in a new issue