mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* Introduce feature for assigning keyboard shortcuts Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Enable keyboard shortcuts automatically instead of requiring explicit listener to be used in the application Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Start using keyboard shortcuts feature Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Update package-lock after rebase Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Tweak scripts for a package Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Introduce modifier for ctrl or command based on platform in use Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> --------- Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
13 lines
331 B
TypeScript
13 lines
331 B
TypeScript
import React from "react";
|
|
|
|
export interface KeyboardShortcutScopeProps {
|
|
id: string;
|
|
children: React.ReactNode;
|
|
}
|
|
|
|
export const KeyboardShortcutScope = ({ id, children }: KeyboardShortcutScopeProps) => (
|
|
<div data-keyboard-shortcut-scope={id} data-keyboard-shortcut-scope-test={id} tabIndex={-1}>
|
|
{children}
|
|
</div>
|
|
);
|