1import React from 'react';
2import { ReactComponent as Copy } from 'assets/copy.svg';
4import useCopiable from 'lib/useCopiable';
5import WithTooltip from 'components/WithTooltip';
7export default function CopiableWithTooltip({
14 const [doCopy, didCopy] = useCopiable(text || children);
17 <As className={className} {...rest}>
19 <WithTooltip content={didCopy ? 'Copied!' : 'Copy'}>
21 style={{ height: '1em', width: '1em' }}
22 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