ItemCursada.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import React, { Component } from 'react';
  2. import { Text, ScrollView } from 'react-native';
  3. import { Actions } from 'react-native-router-flux';
  4. import { Button, Card, CardSection } from './common';
  5. class ItemCursada extends Component {
  6. onRowPress(){
  7. //console.log(this.props.data); //_id
  8. Actions.ViewCursada( { _id: this.props.data._id } );
  9. }
  10. render() {
  11. const { data } = this.props;
  12. return (
  13. <ScrollView>
  14. <Card>
  15. <CardSection>
  16. <Text style={styles.titleStyle}>
  17. {data.titulo}
  18. </Text>
  19. </CardSection>
  20. <CardSection>
  21. <Text>{data.descCorta}</Text>
  22. <Text>Mas info</Text>
  23. </CardSection>
  24. <CardSection>
  25. <Text>{data.dia}</Text>
  26. <Text>Mostrar como hora ajustado a zona</Text>
  27. <Text>{data.horaIni} a {data.horaFin}</Text>
  28. </CardSection>
  29. <CardSection>
  30. <Button onPress={this.onRowPress.bind(this)}>
  31. Ingresar
  32. </Button>
  33. </CardSection>
  34. </Card>
  35. </ScrollView>
  36. );
  37. }
  38. }
  39. const styles = {
  40. titleStyle: {
  41. fontSize: 18,
  42. paddingLeft: 15
  43. }
  44. };
  45. export default ItemCursada;