mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-15 21:53:36 +01:00
22 lines
406 B
TypeScript
22 lines
406 B
TypeScript
import classNames from 'classnames';
|
|
|
|
interface Props {
|
|
modifier: 'Meta' | 'Control' | 'Shift';
|
|
keyName: string;
|
|
}
|
|
|
|
const keys: Record<Props['modifier'], string> = {
|
|
Control: '⌃',
|
|
Meta: '⌘',
|
|
Shift: '⇧',
|
|
};
|
|
|
|
export function HotKey({ modifier, keyName }: Props) {
|
|
return (
|
|
<span className={classNames('text-sm text-gray-600')}>
|
|
{keys[modifier]}
|
|
{keyName}
|
|
</span>
|
|
);
|
|
}
|