mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
feat: keyboardshortcuts dialog.
This commit is contained in:
36
client/src/containers/KeyboardShortcuts/ShortcutsTable.js
Normal file
36
client/src/containers/KeyboardShortcuts/ShortcutsTable.js
Normal file
@@ -0,0 +1,36 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import { DataTable } from 'components';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import keyboardShortcuts from 'common/keyboardShortcutsOptions';
|
||||
|
||||
/**
|
||||
* keyboard shortcuts table.
|
||||
*/
|
||||
function ShortcutsTable() {
|
||||
const { formatMessage } = useIntl();
|
||||
|
||||
const columns = useMemo(
|
||||
() => [
|
||||
{
|
||||
Header: formatMessage({ id: 'shortcut_keys' }),
|
||||
accessor: 'shortcut_key',
|
||||
disableSortBy: true,
|
||||
className: 'shortcut_key',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
id: 'description',
|
||||
Header: formatMessage({ id: 'description' }),
|
||||
accessor: 'description',
|
||||
disableSortBy: true,
|
||||
className: 'description',
|
||||
width: 250,
|
||||
},
|
||||
],
|
||||
[formatMessage],
|
||||
);
|
||||
|
||||
return <DataTable columns={columns} data={keyboardShortcuts} />;
|
||||
}
|
||||
|
||||
export default ShortcutsTable;
|
||||
Reference in New Issue
Block a user