Advertisement
lordjackson

HomeScreen

Jun 3rd, 2020
775
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import * as React from 'react';
  2. import { Image, StyleSheet } from 'react-native';
  3. import { Container, Header, Button, Text } from 'native-base';
  4. import { Col, Row, Grid } from 'react-native-easy-grid';
  5.  
  6. export default class PaginaHome extends React.Component {
  7.   render() {
  8.     return (
  9.       <Container>
  10.         <Grid>
  11.           <Col style={{ backgroundColor: '#00CE9F' }}>
  12.             <Row style={styles.container}>
  13.               <Text style={styles.paragraph}>
  14.                 Local files and assets can be imported by dragging and dropping
  15.                 them into the editor
  16.               </Text>
  17.               <Image
  18.                 style={styles.logo}
  19.                 source={require('../assets/snack-icon.png')}
  20.               />
  21.               <Text>1</Text>
  22.             </Row>
  23.             <Row>
  24.               <Row>
  25.                 <Button
  26.                   success
  27.                   onPress={() =>
  28.                     this.props.navigation.navigate('Detalhe', {
  29.                       nome: 'Jackson',
  30.                       telefone: '84 98800-0055',
  31.                     })
  32.                   }>
  33.                   <Text>Página Detalhe</Text>
  34.                 </Button>
  35.               </Row>
  36.               <Row>
  37.                 <Button
  38.                   info
  39.                   onPress={() =>
  40.                     this.props.navigation.navigate('Formulário Cliente', {
  41.                       nome: 'Jackson',
  42.                     })
  43.                   }>
  44.                   <Text>Formulário Cliente</Text>
  45.                 </Button>
  46.               </Row>
  47.             </Row>
  48.           </Col>
  49.         </Grid>
  50.       </Container>
  51.     );
  52.   }
  53. }
  54.  
  55. const styles = StyleSheet.create({
  56.   container: {
  57.     alignItems: 'center',
  58.     justifyContent: 'center',
  59.     padding: 24,
  60.   },
  61.   paragraph: {
  62.     margin: 24,
  63.     marginTop: 0,
  64.     fontSize: 14,
  65.     fontWeight: 'bold',
  66.     textAlign: 'center',
  67.   },
  68.   logo: {
  69.     marginTop: -180,
  70.     height: 128,
  71.     width: 128,
  72.   },
  73. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement