|
@@ -1,10 +1,8 @@
|
|
|
import React, { Component } from 'react';
|
|
import React, { Component } from 'react';
|
|
|
-import { Text, TextInput, ListView } from 'react-native';
|
|
|
|
|
-import { Card, CardSection } from '../../components/common';
|
|
|
|
|
|
|
+import { View, Text, TextInput, ListView } from 'react-native';
|
|
|
|
|
|
|
|
class Chat extends Component {
|
|
class Chat extends Component {
|
|
|
|
|
|
|
|
-
|
|
|
|
|
componentWillMount() {
|
|
componentWillMount() {
|
|
|
this.createDataSource(this.props);
|
|
this.createDataSource(this.props);
|
|
|
}
|
|
}
|
|
@@ -20,24 +18,20 @@ class Chat extends Component {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
renderRow({ time, user, text }) {
|
|
renderRow({ time, user, text }) {
|
|
|
- return <Text>[{ time}] { user}: { text}</Text>;
|
|
|
|
|
|
|
+ return <Text>[{time}] {user}: {text}</Text>;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
render() {
|
|
|
return (
|
|
return (
|
|
|
- <Card style={{ flex: 1 }}>
|
|
|
|
|
- <CardSection>
|
|
|
|
|
- <ListView
|
|
|
|
|
- enableEmptySections
|
|
|
|
|
- dataSource={this.dataSource}
|
|
|
|
|
- style={{ flex: 1 }}
|
|
|
|
|
- renderRow={this.renderRow}
|
|
|
|
|
- />
|
|
|
|
|
- </CardSection>
|
|
|
|
|
- <CardSection>
|
|
|
|
|
- <TextInput style={{ flex: 1 }} placeholder='Comentario' />
|
|
|
|
|
- </CardSection>
|
|
|
|
|
- </Card>
|
|
|
|
|
|
|
+ <View>
|
|
|
|
|
+ <ListView
|
|
|
|
|
+ enableEmptySections
|
|
|
|
|
+ dataSource={this.dataSource}
|
|
|
|
|
+ style={{ flex: 1, minHeight: 200 }}
|
|
|
|
|
+ renderRow={this.renderRow}
|
|
|
|
|
+ />
|
|
|
|
|
+ <TextInput style={{ height: 40, flex: 1 }} placeholder='Comentario' />
|
|
|
|
|
+ </View>
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|