|
@@ -1,7 +1,7 @@
|
|
|
import React, { Component } from 'react';
|
|
import React, { Component } from 'react';
|
|
|
-import { Text, ListView, View, TouchableOpacity, Image } from 'react-native';
|
|
|
|
|
|
|
+import { Text, ListView, View, TouchableOpacity, Image, TextInput } from 'react-native';
|
|
|
import { Actions } from 'react-native-router-flux';
|
|
import { Actions } from 'react-native-router-flux';
|
|
|
-import { Card, CardSection, Button, Input } from '../common';
|
|
|
|
|
|
|
+import { Card, CardSection, Button } from '../common';
|
|
|
|
|
|
|
|
class Comentarios extends Component {
|
|
class Comentarios extends Component {
|
|
|
|
|
|
|
@@ -48,23 +48,36 @@ class Comentarios extends Component {
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ renderNewComment() {
|
|
|
|
|
+ return (
|
|
|
|
|
+ <Card>
|
|
|
|
|
+ <CardSection>
|
|
|
|
|
+ <Text style={{backgroundColor:'red',justifyContent:'center'}}>
|
|
|
|
|
+ Dejar un comentario
|
|
|
|
|
+ </Text>
|
|
|
|
|
+ </CardSection>
|
|
|
|
|
+ <CardSection>
|
|
|
|
|
+ <TextInput
|
|
|
|
|
+ autoCorrect={true}
|
|
|
|
|
+ multiline={true}
|
|
|
|
|
+ style={{flex:1}}
|
|
|
|
|
+ />
|
|
|
|
|
+ </CardSection>
|
|
|
|
|
+ <CardSection>
|
|
|
|
|
+ <Button>Enviar</Button>
|
|
|
|
|
+ </CardSection>
|
|
|
|
|
+ </Card>
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
renderList() {
|
|
renderList() {
|
|
|
if (this.props.comentarios === undefined ||
|
|
if (this.props.comentarios === undefined ||
|
|
|
this.props.comentarios.length == 0 ) {
|
|
this.props.comentarios.length == 0 ) {
|
|
|
return (
|
|
return (
|
|
|
- <View>
|
|
|
|
|
- <Text> Aún no hay comentarios </Text>
|
|
|
|
|
- <Card >
|
|
|
|
|
- <CardSection>
|
|
|
|
|
- <Text> Dejar un comentario </Text>
|
|
|
|
|
- </CardSection>
|
|
|
|
|
- <CardSection>
|
|
|
|
|
- <Input multiline={true} placeholder="comentario"></Input>
|
|
|
|
|
- </CardSection>
|
|
|
|
|
- <CardSection>
|
|
|
|
|
- <Button>Enviar</Button>
|
|
|
|
|
- </CardSection>
|
|
|
|
|
- </Card>
|
|
|
|
|
|
|
+ <View style={{margin:10}}>
|
|
|
|
|
+ <Text style={{fontSize:14,alignSelf:'center'}}>
|
|
|
|
|
+ Aún no hay comentarios
|
|
|
|
|
+ </Text>
|
|
|
|
|
+ {this.renderNewComment()}
|
|
|
</View>
|
|
</View>
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|