/* @flow */ import * as React from 'react'; import PropTypes from 'prop-types'; import { ScrollView, StyleSheet } from 'react-native'; import { TextInput, withTheme } from 'react-native-paper'; import type { Theme } from 'react-native-paper/types'; type Props = { theme: Theme, }; type State = { text: string, }; class TextInputExample extends React.Component { static title = 'TextInput'; static propTypes = { theme: PropTypes.object.isRequired, }; state = { text: '', }; render() { const { theme: { colors: { background } } } = this.props; return ( this.setState({ text })} /> ); } } const styles = StyleSheet.create({ container: { flex: 1, padding: 8, }, inputContainerStyle: { margin: 8, }, }); export default withTheme(TextInputExample);