1import React from 'react';
2import { CopyButton as BaseCopyButton } from 'components/Buttons';
3import useCopiable from 'lib/useCopiable';
4import WithTooltip, { TooltipPosition } from '../WithTooltip';
6interface CopyButtonWideProps {
8 children?: React.ReactNode;
9 rest?: React.HTMLProps<HTMLButtonElement>;
12export function CopyButtonWide({
16}: CopyButtonWideProps) {
17 const [doCopy, didCopy] = useCopiable(text);
20 content={didCopy ? 'Copied!' : 'Copy'}
21 className={'rel full nowrap copy-button-wide'}
22 position={TooltipPosition.TopRight}>
23 <BaseCopyButton as="span" onClick={doCopy} text={text} {...rest}>
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list