Skip to content

Commit

Permalink
fix(ui): make download button accessible via keyboard (#8974)
Browse files Browse the repository at this point in the history
Refs #8881
  • Loading branch information
morsko1 authored Aug 16, 2023
1 parent 377b54a commit c90ef50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/core/components/highlight-code.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@ const HighlightCode = ({value, fileName, className, downloadable, getConfigs, ca

return (
<div className="highlight-code" ref={rootRef}>
{!downloadable ? null :
<div className="download-contents" onClick={handleDownload}>
Download
</div>
}

{canCopy && (
<div className="copy-to-clipboard">
<CopyToClipboard text={value}><button/></CopyToClipboard>
</div>
)}

{!downloadable ? null :
<button className="download-contents" onClick={handleDownload}>
Download
</button>
}

{canSyntaxHighlight
? <SyntaxHighlighter
language={language}
Expand Down
2 changes: 1 addition & 1 deletion src/style/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -745,10 +745,10 @@
position: absolute;
bottom: 10px;
right: 10px;
cursor: pointer;
background: #7d8293;
text-align: center;
padding: 5px;
border: none;
border-radius: 4px;
font-family: sans-serif;
font-weight: 600;
Expand Down

0 comments on commit c90ef50

Please sign in to comment.