Skip to content

Instantly share code, notes, and snippets.

@JCaraballo113
Created February 14, 2017 03:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JCaraballo113/e97179a679b94a340a0888e55ca90f32 to your computer and use it in GitHub Desktop.
Save JCaraballo113/e97179a679b94a340a0888e55ca90f32 to your computer and use it in GitHub Desktop.
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