1import React from 'react';
3import useCopiable from 'lib/useCopiable';
4import WithTooltip, { TooltipPosition } from 'components/WithTooltip';
5import { Icon } from '@tlon/indigo-react';
7export default function CopiableWithTooltip({
12 position = TooltipPosition.Top,
15 const [doCopy, didCopy] = useCopiable(text || children);
18 <As className={className} {...rest}>
20 <WithTooltip position={position} content={didCopy ? 'Copied!' : 'Copy'}>
23 style={{ height: '1em', width: '1em' }}
24 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