Skip to content

Commit

Permalink
chore: onKeyDown to extraProps
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanVor committed Feb 11, 2024
1 parent 88ffdc6 commit 4d80807
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export interface ButtonProps extends DOMProps, QAProps {
onMouseLeave?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;
onFocus?: React.FocusEventHandler<HTMLButtonElement | HTMLAnchorElement>;
onBlur?: React.FocusEventHandler<HTMLButtonElement | HTMLAnchorElement>;
onKeyDown?: React.KeyboardEventHandler<HTMLButtonElement>;
/** Button content. You can mix button text with `<Icon/>` component */
children?: React.ReactNode;
}
Expand Down Expand Up @@ -107,7 +106,6 @@ const ButtonWithHandlers = React.forwardRef<HTMLElement, ButtonProps>(function B
onMouseLeave,
onFocus,
onBlur,
onKeyDown,
children,
id,
style,
Expand Down Expand Up @@ -140,7 +138,6 @@ const ButtonWithHandlers = React.forwardRef<HTMLElement, ButtonProps>(function B
onMouseLeave,
onFocus,
onBlur,
onKeyDown,
id,
style,
className: b(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const TableColumnSetup = (props: TableColumnSetupProps) => {

return (
renderSwitcher?.({onClick: toggleOpen, onKeyDown}) || (
<Button onClick={toggleOpen} onKeyDown={onKeyDown}>
<Button onClick={toggleOpen} extraProps={{onKeyDown}}>
<Icon data={Gear} />
{i18n('button_switcher')}
</Button>
Expand Down

0 comments on commit 4d80807

Please sign in to comment.