fix(ui): make download button accessible via keyboard (#8974)
Refs #8881
This commit is contained in:
committed by
GitHub
parent
377b54a998
commit
c90ef50e73
@@ -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}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user