Merge branch '28-add-item-modal' into 'main'
Draft: Resolve "add Item Modal" Closes #28 See merge request thschleicher/interaktive-systeme!9
This commit is contained in:
commit
aabfa9afa7
1 changed files with 59 additions and 6 deletions
|
|
@ -1,10 +1,63 @@
|
||||||
import { View, Text } from 'react-native'
|
import {View, Text, TextInput, StyleSheet} from 'react-native'
|
||||||
import React from 'react'
|
import React, { useState } from 'react'
|
||||||
|
import {FlatList} from "react-native-gesture-handler";
|
||||||
|
import {ExpenseItem} from "../../../components";
|
||||||
export default function addItem() {
|
export default function addItem() {
|
||||||
|
|
||||||
|
const[zahl, setZahl]=useState('');
|
||||||
|
const handleZahlEingabe = (text: React.SetStateAction<string>)=> {
|
||||||
|
setZahl(text);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View>
|
<View style={styles.all}>
|
||||||
<Text>addItem</Text>
|
<Text>Enter data</Text>
|
||||||
|
<View style={styles.container} >
|
||||||
|
<Text style={styles.text}>{"Betrag:"}</Text>
|
||||||
|
<View style={styles.placeholder}>
|
||||||
|
<Text style={styles.text}>{"__ ,__ __€"}</Text>
|
||||||
|
</View>
|
||||||
|
<TextInput style={{fontSize:26, ...styles.input}}
|
||||||
|
placeholder="------|"
|
||||||
|
keyboardType="numeric"
|
||||||
|
value={zahl}
|
||||||
|
onChangeText={handleZahlEingabe}/>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
all:{
|
||||||
|
alignItems:'center',
|
||||||
|
},
|
||||||
|
container: {
|
||||||
|
backgroundColor:"orange",
|
||||||
|
flexDirection:'row',
|
||||||
|
justifyContent:"center",
|
||||||
|
alignItems:"center",
|
||||||
|
borderRadius:20,
|
||||||
|
height: 60,
|
||||||
|
width: 330,
|
||||||
|
paddingHorizontal:16,
|
||||||
|
},
|
||||||
|
input: {
|
||||||
|
//height: 40,
|
||||||
|
textAlign:'right',
|
||||||
|
position:'absolute',
|
||||||
|
right:80,
|
||||||
|
},
|
||||||
|
text:{
|
||||||
|
fontSize:26,
|
||||||
|
//fontWeight:'bold',
|
||||||
|
flex:1,
|
||||||
|
},
|
||||||
|
placeholder:{
|
||||||
|
position: 'absolute',
|
||||||
|
right:16,
|
||||||
|
top:16,//16
|
||||||
|
flexDirection:'row',
|
||||||
|
},
|
||||||
|
})
|
||||||
Reference in a new issue