Created
February 14, 2017 03:56
-
-
Save JCaraballo113/e97179a679b94a340a0888e55ca90f32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { View, Text, TextInput } from 'react-native'; | |
import {Button, Card, CardSection } from './common'; | |
export default class CommentBox extends Component { | |
constructor(props) { | |
super(props); | |
} | |
render() { | |
return ( | |
<Card> | |
<CardSection> | |
<TextInput | |
style={{flex: 1, height: 100}} | |
multiline | |
placeholder="Say something interesting" | |
onChangeText={(text) => this.props.textChangeHandler(text)} | |
/> | |
</CardSection> | |
<CardSection> | |
<Button onPress={this.props.addComment}>Comment</Button> | |
</CardSection> | |
</Card> | |
); | |
} | |
} | |
const styles = { | |
textInputContainer: { | |
flex: 1, | |
height: 100, | |
borderRadius: 5, | |
borderWidth: 1, | |
borderColor: '#eee', | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment