/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* 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';
const React = require('React');
const ReactNative = require('react-native');
const {
Alert,
Button,
InputAccessoryView,
ScrollView,
StyleSheet,
Text,
TextInput,
View,
} = ReactNative;
class Message extends React.PureComponent<*> {
render() {
return (
Text Message
);
}
}
class TextInputBar extends React.PureComponent<*, *> {
state = {text: ''};
render() {
return (
{
this.setState({text});
}}
value={this.state.text}
placeholder={'Type a message...'}
/>
);
}
}
class InputAccessoryViewExample extends React.Component<*> {
static title = '';
static description =
'Example showing how to use an InputAccessoryView to build an iMessage-like sticky text input';
render() {
return (
{Array(15)
.fill()
.map((_, i) => )}
);
}
}
const styles = StyleSheet.create({
textInputContainer: {
flexDirection: 'row',
},
textInput: {
flex: 1,
paddingLeft: 10,
},
text: {
padding: 10,
color: 'white',
},
textBubbleBackground: {
backgroundColor: '#2f7bf6',
borderRadius: 20,
width: 110,
margin: 20,
},
});
module.exports = InputAccessoryViewExample;