From 878e63cbed28bbfd4eb55e9a6344aecdcf3fca26 Mon Sep 17 00:00:00 2001 From: Gregory Douglas Date: Fri, 10 Jan 2025 13:28:34 -0500 Subject: [PATCH] Prefer direct children type declaration in HotkeysProps --- packages/core/src/components/hotkeys/hotkeys.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/core/src/components/hotkeys/hotkeys.tsx b/packages/core/src/components/hotkeys/hotkeys.tsx index 824dd3064b..6897d5351f 100644 --- a/packages/core/src/components/hotkeys/hotkeys.tsx +++ b/packages/core/src/components/hotkeys/hotkeys.tsx @@ -24,7 +24,7 @@ import { H4 } from "../html/html"; import { Hotkey, type HotkeyProps } from "./hotkey"; -export interface HotkeysProps extends Props, React.PropsWithChildren { +export interface HotkeysProps extends Props { /** * In order to make local hotkeys work on elements that are not normally * focusable, such as `
`s or ``s, we add a `tabIndex` attribute @@ -34,6 +34,11 @@ export interface HotkeysProps extends Props, React.PropsWithChildren { * the `tabIndex` from the component decorated by `HotkeysTarget`. */ tabIndex?: number; + + /** + * An array of `Hotkey` components that define the hotkeys to be used. + */ + children?: Array>; } /**