Files
yaak/src-web/components/core/HotKeyLabel.tsx
Gregory Schier a2dbd7f849 Download Active Response (#49)
This PR prompts you to save un-previewable file types and adds an option
to save to the response history.
2024-06-10 16:36:09 -07:00

14 lines
423 B
TypeScript

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-fg-subtle whitespace-nowrap')}>{label}</span>;
}