1import React, { useState, useCallback } from 'react';
3export default function WithTooltip({ content, children }) {
4 const [isHovered, setHovered] = useState(false);
5 const onMouseEnter = useCallback(() => setHovered(true), []);
6 const onMouseLeave = useCallback(() => setHovered(false), []);
10 className="rel nowrap inline-block"
11 onMouseEnter={onMouseEnter}
12 onMouseLeave={onMouseLeave}>
16 className="abs mb1 bg-black white ph4 pv2 r4"
17 style={{ bottom: '100%' }}>
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