mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-20 07:51:20 +02:00
Add configurable hotkeys support (#343)
This commit is contained in:
15
src-web/components/core/HotkeyLabel.tsx
Normal file
15
src-web/components/core/HotkeyLabel.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import classNames from 'classnames';
|
||||
import type { HotkeyAction } from '../../hooks/useHotKey';
|
||||
import { useHotkeyLabel } from '../../hooks/useHotKey';
|
||||
|
||||
interface Props {
|
||||
action: HotkeyAction;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function HotkeyLabel({ action, className }: Props) {
|
||||
const label = useHotkeyLabel(action);
|
||||
return (
|
||||
<span className={classNames(className, 'text-text-subtle whitespace-nowrap')}>{label}</span>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user