Advertisement
CarlosWGama

Aula - State - I

Jan 25th, 2023
964
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { Button, StyleSheet, Text, TextInput, View } from 'react-native';
  2.  
  3. export default function App() {
  4.  
  5.   return (
  6.     <View style={styles.container}>
  7.       <View style={styles.linha}>
  8.         <Text style={styles.texto}>Valor 1: </Text>
  9.         <Text style={styles.texto}>Valor 2: </Text>
  10.       </View>
  11.  
  12.       <View style={styles.linha}>
  13.         <TextInput  placeholder="Digite o valor 1" keyboardType='decimal-pad'/>
  14.         <TextInput  placeholder="Digite o valor 2" keyboardType='decimal-pad'/>
  15.       </View>
  16.  
  17.       <Button title="Calcular" />
  18.  
  19.       <View style={[styles.linha, {marginTop: 30}]}>
  20.         <Text style={styles.texto}>Resultado: </Text>
  21.         <Text style={styles.texto}></Text>
  22.       </View>
  23.  
  24.     </View>
  25.   );
  26. }
  27.  
  28. const styles = StyleSheet.create({
  29.   container: {
  30.     padding: 50
  31.   },
  32.   texto: { fontSize: 16},
  33.   linha: {
  34.     flexDirection: 'row',
  35.     justifyContent: 'space-between'
  36.    
  37.   }
  38. });
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement