Skip to content

Commit 19f7c40

Browse files
committed
Remove onKeyUp
1 parent a440183 commit 19f7c40

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lib/assertions.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,10 @@ exports.props = {
7777
}
7878
},
7979

80-
// I don't know that it matters if you use onKeyUp or onKeyDown.
8180
BUTTON_ROLE_ENTER: {
82-
msg: 'You have `role="button"` but did not define an `onKeyDown` or `onKeyUp` handler. Add it, and have the "Enter" key do the same thing as an `onClick` handler.',
81+
msg: 'You have `role="button"` but did not define an `onKeyDown` handler. Add it, and have the "Enter" key do the same thing as an `onClick` handler.',
8382
test (tagName, props, children) {
84-
return !(props.role === 'button' && !(props.onKeyUp || props.onKeyDown));
83+
return !(props.role === 'button' && props.onKeyDown);
8584
}
8685
}
8786

0 commit comments

Comments
 (0)