(shortcut: string)
| 14 | }; |
| 15 | |
| 16 | function renderShortcut(shortcut: string): JSX.Element { |
| 17 | const keys = shortcut.split(' ').map(key => ( |
| 18 | <span className="rgh-shortcut-chord" data-kbd-chord="true"> |
| 19 | {upperCaseFirst(key)} |
| 20 | </span> |
| 21 | )); |
| 22 | return ( |
| 23 | <kbd className="rgh-shortcut"> |
| 24 | {joinJsx(' ', keys)} |
| 25 | </kbd> |
| 26 | ); |
| 27 | } |
| 28 | |
| 29 | function createTooltipFor(element: Element, content: string | TooltipOptions): HTMLElement { |
| 30 | const options: TooltipOptions = typeof content === 'string' |
no test coverage detected