({ code }: Props)
| 8 | } |
| 9 | |
| 10 | export const ActionBar = ({ code }: Props) => { |
| 11 | const [isCopied, setCopied] = useClipboard(code, { |
| 12 | successDuration: 1400, |
| 13 | }) |
| 14 | |
| 15 | return ( |
| 16 | <div className="d-flex flex-justify-between flex-items-center color-bg-default border-left border-top border-right px-3 py-1"> |
| 17 | <div /> |
| 18 | <div className="d-flex"> |
| 19 | {/* <Tooltip aria-label="View repository" className="mr-2"> |
| 20 | <button className="btn-octicon ml-0"> |
| 21 | <EyeIcon /> |
| 22 | </button> |
| 23 | </Tooltip> |
| 24 | <Tooltip aria-label="Fork repository" className="mr-2"> |
| 25 | <button className="btn-octicon ml-0"> |
| 26 | <RepoForkedIcon /> |
| 27 | </button> |
| 28 | </Tooltip> */} |
| 29 | <Tooltip |
| 30 | align="right" |
| 31 | direction="nw" |
| 32 | aria-label={isCopied ? 'Copied!' : 'Copy to clipboard'} |
| 33 | > |
| 34 | <button className="btn-octicon" onClick={() => setCopied()}> |
| 35 | {isCopied ? <CheckIcon /> : <CopyIcon />} |
| 36 | </button> |
| 37 | </Tooltip> |
| 38 | </div> |
| 39 | </div> |
| 40 | ) |
| 41 | } |
nothing calls this directly
no outgoing calls
no test coverage detected