<commit_before>import React from "react";
import {
  Dialog,
  Tab,
  Tabs,
  KeyCombo,
  Classes /*, Tooltip*/
} from "@blueprintjs/core";
// import { startCase } from "lodash";
import {
  getHotkeyProps /*, hotkeysById, comboToLabel*/
} from "../utils/hotkeyUtils";
import classNames from "classnames";

import "./style.css";

export default function HotkeysDialog(props) {
  if (!props.hotkeySets) {
    console.error("Missing hotkeySets in HotkeysDialog");
    return null;
  }
  const sections = Object.keys(props.hotkeySets);
  return (
    <Dialog
      isOpen={props.isOpen}
      onClose={props.onClose}
      title="Keyboard Shortcuts"
    >
      <Tabs className="tg-hotkeys-dialog">
        {sections.map(name => (
          <Tab
            key={name}
            id={name}
            title={name}
            panel={
              <div className="tg-table-wrapper">
                <table
                  className={classNames(
                    Classes.HTML_TABLE,
                    Classes.HTML_TABLE_STRIPED,
                    Classes.HTML_TABLE_BORDERED
                  )}<commit_msg>adding hotkeysDialog dialogTitle prop<commit_after>import React from "react";
import {
  Dialog,
  Tab,
  Tabs,
  KeyCombo,
  Classes /*, Tooltip*/
} from "@blueprintjs/core";
// import { startCase } from "lodash";
import classNames from "classnames";
import {
  getHotkeyProps /*, hotkeysById, comboToLabel*/
} from "../utils/hotkeyUtils";

import "./style.css";

export default function HotkeysDialog(props) {
  if (!props.hotkeySets) {
    console.error("Missing hotkeySets in HotkeysDialog");
    return null;
  }
  const sections = Object.keys(props.hotkeySets);
  return (
    <Dialog
      isOpen={props.isOpen}
      onClose={props.onClose}
      title={props.dialogTitle || "Keyboard Shortcuts"}
    >
      <Tabs className="tg-hotkeys-dialog">
        {sections.map(name => (
          <Tab
            key={name}
            id={name}
            title={name}
            panel={
              <div className="tg-table-wrapper">
                <table
                  className={classNames(
                    Classes.HTML_TABLE,
                    Classes.HTML_TABLE_STRIPED,
                    Classes.HTML_TABLE_BORDERED
                  )}
{'fraction_non_alphanumeric': 0.11834579850417949, 'fraction_numerical': 0.0, 'mean_word_length': 2.093877551020408, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5418922', 'n_tokens_mistral': 679, 'n_tokens_neox': 652, 'n_words': 134}