diff --git a/packages/rn-tester/js/examples/KeyboardEventsExample/KeyboardEventsExample.js b/packages/rn-tester/js/examples/KeyboardEventsExample/KeyboardEventsExample.js index f3a173f5168138..0eb69175bea7eb 100644 --- a/packages/rn-tester/js/examples/KeyboardEventsExample/KeyboardEventsExample.js +++ b/packages/rn-tester/js/examples/KeyboardEventsExample/KeyboardEventsExample.js @@ -26,13 +26,6 @@ const { View, } = ReactNative; -const switchStyle = { - alignItems: 'center', - padding: 10, - flexDirection: 'row', - justifyContent: 'space-between', -}; - function KeyEventExample(): React.Node { // $FlowFixMe[missing-empty-array-annot] const [log, setLog] = React.useState([]); @@ -65,30 +58,6 @@ function KeyEventExample(): React.Node { [appendLog], ); - const [showView, setShowView] = React.useState(true); - const toggleShowView = React.useCallback( - (value: boolean) => { - setShowView(value); - }, - [setShowView], - ); - - const [showTextInput, setShowTextInput] = React.useState(true); - const toggleShowTextInput = React.useCallback( - (value: boolean) => { - setShowTextInput(value); - }, - [setShowTextInput], - ); - - const [showTextInput2, setShowTextInput2] = React.useState(true); - const toggleShowTextInput2 = React.useCallback( - (value: boolean) => { - setShowTextInput2(value); - }, - [setShowTextInput2], - ); - return ( @@ -100,111 +69,81 @@ function KeyEventExample(): React.Node { {Platform.OS === 'macos' ? ( <> - - View - - - {showView ? ( - <> - - keyDownEvents: [g, Escape, Enter, ArrowLeft]{'\n'} - keyUpEvents: [c, d] - - - - ) : null} - - TextInput - - - {showTextInput ? ( - <> - - keyDownEvents: [ArrowRight, ArrowDown, Ctrl+Enter]{'\n'} - keyUpEvents: [Escape, Enter] - - - - - ) : null} - - TextInput with no handled keys - - - {showTextInput2 ? ( - <> - - keyDownEvents: []{'\n'} - keyUpEvents: [] - - - - - ) : null} + + keyDownEvents: [g, Escape, Enter, ArrowLeft]{'\n'} + keyUpEvents: [c, d] + + + + keyDownEvents: [ArrowRight, ArrowDown, Ctrl+Enter]{'\n'} + keyUpEvents: [Escape, Enter] + + + + + keyDownEvents: []{'\n'} + keyUpEvents: [] + + + ) : null}