From 1e92ff8efd6ae1d5d5f81e6d6f51ca8802515c39 Mon Sep 17 00:00:00 2001 From: Yury Kozyrev Date: Fri, 9 Feb 2018 03:35:54 +0100 Subject: [PATCH] onKeyPress and onKeyDown typings (#9316) * Update Checkbox.tsx * Update button.tsx --- components/button/button.tsx | 2 ++ components/checkbox/Checkbox.tsx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/components/button/button.tsx b/components/button/button.tsx index 375f2bf176..f0a11573f9 100644 --- a/components/button/button.tsx +++ b/components/button/button.tsx @@ -47,6 +47,8 @@ export interface ButtonProps { onClick?: React.FormEventHandler; onMouseUp?: React.FormEventHandler; onMouseDown?: React.FormEventHandler; + onKeyPress?: React.KeyboardEvent; + onKeyDown?: React.KeyboardEvent; tabIndex?: number; loading?: boolean | { delay?: number }; disabled?: boolean; diff --git a/components/checkbox/Checkbox.tsx b/components/checkbox/Checkbox.tsx index 7dc6fdf039..bd90e2ded6 100644 --- a/components/checkbox/Checkbox.tsx +++ b/components/checkbox/Checkbox.tsx @@ -15,6 +15,8 @@ export interface AbstractCheckboxProps { onChange?: React.ChangeEventHandler; onMouseEnter?: React.MouseEventHandler; onMouseLeave?: React.MouseEventHandler; + onKeyPress?: React.KeyboardEvent; + onKeyDown?: React.KeyboardEvent; value?: any; tabIndex?: number; name?: string;