1import React from 'react';
2import cn from 'classnames';
3import Tooltip from 'react-simple-tooltip';
4import { ReactComponent as Copy } from 'assets/copy.svg';
6import useCopiable from 'lib/useCopiable';
8export default function CopiableWithTooltip({
15 const [doCopy, didCopy] = useCopiable(text || children);
18 <As className={cn(className, 'nowrap')} {...rest}>
21 content={didCopy ? 'Copied!' : 'Copy'}
22 customCss={{ whitespace: 'nowrap' }}>
24 style={{ height: '1em', width: '1em' }}
25 className="ml1 pointer"
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