/** * 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. * * @format * @flow */ 'use strict'; import type { RNTesterModule, RNTesterModuleExample, } from '../../types/RNTesterTypes'; import type {KeyboardType} from 'react-native/Libraries/Components/TextInput/TextInput'; import ExampleTextInput from './ExampleTextInput'; const TextInputSharedExamples = require('./TextInputSharedExamples.js'); const React = require('react'); const { Alert, Button, InputAccessoryView, StyleSheet, Switch, Text, TextInput, View, } = require('react-native'); 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} />