mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 09:08:32 +02:00
Fix hotkey react keys
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import React from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import type { HotkeyAction } from '../../hooks/useHotKey';
|
import type { HotkeyAction } from '../../hooks/useHotKey';
|
||||||
import { HotKey } from './HotKey';
|
import { HotKey } from './HotKey';
|
||||||
import { HotKeyLabel } from './HotKeyLabel';
|
import { HotKeyLabel } from './HotKeyLabel';
|
||||||
@@ -15,10 +15,10 @@ export const HotKeyList = ({ hotkeys, bottomSlot, className }: Props) => {
|
|||||||
<div className={classNames(className, 'h-full flex items-center justify-center')}>
|
<div className={classNames(className, 'h-full flex items-center justify-center')}>
|
||||||
<div className="px-4 grid gap-2 grid-cols-[auto_auto]">
|
<div className="px-4 grid gap-2 grid-cols-[auto_auto]">
|
||||||
{hotkeys.map((hotkey) => (
|
{hotkeys.map((hotkey) => (
|
||||||
<>
|
<Fragment key={hotkey}>
|
||||||
<HotKeyLabel className="truncate" action={hotkey} />
|
<HotKeyLabel className="truncate" action={hotkey} />
|
||||||
<HotKey className="ml-4" action={hotkey} />
|
<HotKey className="ml-4" action={hotkey} />
|
||||||
</>
|
</Fragment>
|
||||||
))}
|
))}
|
||||||
{bottomSlot}
|
{bottomSlot}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user