mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
30 lines
804 B
JavaScript
30 lines
804 B
JavaScript
import React, { lazy } from 'react';
|
|
import { FormattedMessage as T, useIntl } from 'react-intl';
|
|
import { Dialog, DialogSuspense } from 'components';
|
|
import withDialogRedux from 'components/DialogReduxConnect';
|
|
import { compose } from 'utils';
|
|
|
|
const KeyboardShortcutsContent = lazy(() =>
|
|
import('./KeyboardShortcutsDialogContent'),
|
|
);
|
|
|
|
/**
|
|
* Keyboard shortcuts dialog.
|
|
*/
|
|
function KeyboardShortcutsDialog({ dialogName, isOpen }) {
|
|
return (
|
|
<Dialog
|
|
name={dialogName}
|
|
isOpen={isOpen}
|
|
className={'dialog--keyboard-shortcuts'}
|
|
title={<T id={'keyboard_shortcuts'} canEscapeKeyClose={true} />}
|
|
>
|
|
<DialogSuspense>
|
|
<KeyboardShortcutsContent />
|
|
</DialogSuspense>
|
|
</Dialog>
|
|
);
|
|
}
|
|
|
|
export default compose(withDialogRedux())(KeyboardShortcutsDialog);
|