import React from "react"; import { t } from "../i18n"; import { isDarwin } from "../keys"; import { Dialog } from "./Dialog"; import { getShortcutKey } from "../utils"; import "./ShortcutsDialog.scss"; import { EVENT_EXIT, trackEvent } from "../analytics"; const Columns = (props: { children: React.ReactNode }) => (
{props.children}
); const Column = (props: { children: React.ReactNode }) => (
{props.children}
); const ShortcutIsland = (props: { caption: string; children: React.ReactNode; }) => (

{props.caption}

{props.children}
); const Shortcut = (props: { label: string; shortcuts: string[]; isOr: boolean; }) => { return (
{props.label}
{props.shortcuts.map((shortcut, index) => ( {shortcut} {props.isOr && index !== props.shortcuts.length - 1 && t("shortcutsDialog.or")} ))}
); }; Shortcut.defaultProps = { isOr: true, }; const ShortcutKey = (props: { children: React.ReactNode }) => ( ); const Footer = () => (
{ trackEvent(EVENT_EXIT, "blog"); }} > {t("shortcutsDialog.blog")} { trackEvent(EVENT_EXIT, "guides"); }} > {t("shortcutsDialog.howto")} { trackEvent(EVENT_EXIT, "issues"); }} > {t("shortcutsDialog.github")}
); export const ShortcutsDialog = ({ onClose }: { onClose?: () => void }) => { const handleClose = React.useCallback(() => { if (onClose) { onClose(); } }, [onClose]); return ( <> ); };