Skip to content

Commit

Permalink
chore: fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Mar 13, 2024
1 parent ea2c51a commit f6291c1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import type { IconComponent, IconProps, IconSize } from '~components/Icons';
import type { DurationString, EasingString } from '~tokens/global';
import type { BorderRadiusValues, BorderWidthValues, SpacingValues } from '~tokens/theme/theme';
import type { Platform } from '~utils';
import { castWebType, isReactNative } from '~utils';
import { isReactNative } from '~utils';
import type { StyledPropsBlade } from '~components/Box/styledProps';
import { useButtonGroupContext } from '~components/ButtonGroup/ButtonGroupContext';
import { getStyledProps } from '~components/Box/styledProps';
Expand Down Expand Up @@ -494,9 +494,10 @@ const _BaseButton: React.ForwardRefRenderFunction<BladeElementRef, BaseButtonPro
onMouseMove={onMouseMove}
onPointerDown={onPointerDown}
onPointerEnter={onPointerEnter}
onKeyDown={(event: React.KeyboardEvent) => {
// Setting type for web fails it on native typecheck and vice versa
onKeyDown={(event: any) => {
handleKeyboardPressedIn(event);
if (onKeyDown) onKeyDown(castWebType(event));
if (onKeyDown) onKeyDown(event);
}}
onTouchStart={(event: React.TouchEvent) => {
handlePointerPressedIn();
Expand Down

0 comments on commit f6291c1

Please sign in to comment.