1import { Box, Icon, Text } from '@tlon/indigo-react';
2import cn from 'classnames';
3import useCopiable from '../../lib/useCopiable';
4import withFadeable from './withFadeable';
6interface MasterKeyCopyProps {
11const MasterKeyCopy = ({ text, className }: MasterKeyCopyProps) => {
12 const [doCopy, didCopy] = useCopiable(text);
13 const { color, label, icon } = didCopy
14 ? { color: 'rgb(70,156,106)', label: 'Copied', icon: 'Checkmark' }
15 : { color: 'rgb(89,167,248)', label: 'Copy', icon: 'Copy' };
18 <Box className={cn(['mk-copy', className])} onClick={() => doCopy()}>
25 padding={'10px 15px'}>
26 <Icon color={color} icon={icon as 'Checkmark' | 'Copy'} size="16px" />
27 <Text color={color} fontSize={'14px'} ml="4px" fontFamily={'Inter'}>
35export default MasterKeyCopy;
37export const FadeableMasterKeyCopy = withFadeable(MasterKeyCopy);
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