Skip to content

How to hide the download button when download is not available #260

Answered by igordanchenko
ash67 asked this question in Q&A
Discussion options

You must be logged in to vote

I would like to hide the download button for the slides which are not non-downloadable. When setting dowload: false, it does show the disabled icon which is cool, but I want to completely hide it. Is that possible?

Sure, you can hide the inactive Download button with the following CSS customization:

.yarl__button[aria-label="Download"]:disabled {
  display: none;
}

Also, when rendering customIcon, is it possible to use a different icon when hover/clicking on the download button.

Not unless you implement your own DownloadButton and render it through render.buttonDownload.

However, you can target :hover and :active states and provide certain customizations with CSS.

.yarl__button[aria-l…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ash67
Comment options

Answer selected by ash67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants