import React from 'react'; const GENERAL_SHORTCUTS = [ {key: 'esc', label: 'Close active panel'}, {key: '/', label: 'Activate search field'}, {key: '?', label: 'Toggle shortcut menu'}, {key: 't', label: 'Toggle Table mode'}, {key: 'g', label: 'Toggle Graph mode'}, ]; const CANVAS_METRIC_SHORTCUTS = [ {key: '<', label: 'Select and pin previous metric'}, {key: '>', label: 'Select and pin next metric'}, {key: 'q', label: 'Unpin current metric'}, ]; function renderShortcuts(cuts) { return (
{cuts.map(({key, label}) => (
{key}
{label}
))}
); } export default class HelpPanel extends React.Component { render() { return (

Keyboard Shortcuts

General

{renderShortcuts(GENERAL_SHORTCUTS)}

Canvas Metrics

{renderShortcuts(CANVAS_METRIC_SHORTCUTS)}
); } }