Skip to content

Commit b8d75f1

Browse files
committed
fix: onPress flag
1 parent a6da2bc commit b8d75f1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Button.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ const AwesomeButton = ({
321321

322322
pressAnimation.current.start(() => {
323323
pressed.current = true;
324-
pressing.current = false;
325324

326325
onPressedIn && onPressedIn();
327326
});
@@ -495,7 +494,7 @@ const AwesomeButton = ({
495494
return;
496495
}
497496

498-
if (pressed.current === true || raiseLevel === 0) {
497+
if (pressing.current === true || raiseLevel === 0) {
499498
press();
500499

501500
if (progress === true) {

src/__tests__/__snapshots__/index.test.js.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ exports[`AwesomeButton should render 1`] = `
55
accessible={true}
66
collapsable={false}
77
focusable={true}
8+
hitSlop={null}
89
onBlur={[Function]}
910
onClick={[Function]}
1011
onFocus={[Function]}
@@ -181,6 +182,7 @@ exports[`AwesomeButton should render a default text children 1`] = `
181182
accessible={true}
182183
collapsable={false}
183184
focusable={true}
185+
hitSlop={null}
184186
onBlur={[Function]}
185187
onClick={[Function]}
186188
onFocus={[Function]}

0 commit comments

Comments
 (0)