08.01.2022
This commit is contained in:
parent
990b6a931c
commit
756da80e10
5
.idea/.gitignore
vendored
Normal file
5
.idea/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
12
.idea/NiceQuotes.iml
Normal file
12
.idea/NiceQuotes.iml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/NiceQuotes.iml" filepath="$PROJECT_DIR$/.idea/NiceQuotes.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -1,25 +1,38 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Button, Modal, StyleSheet, TextInput, View } from 'react-native';
|
||||
import { Text, Button, Modal, StyleSheet, TextInput, View } from 'react-native';
|
||||
|
||||
export default class NewQuote extends Component {
|
||||
state = { content: null, author: null } //Inizialer Zustand
|
||||
render() {
|
||||
const { visible, onSave } = this.props; // Einfachere strukturierung
|
||||
const { content, author } = this.state;
|
||||
return (
|
||||
//Neuer Screen
|
||||
<Modal
|
||||
visible={this.props.visible}
|
||||
onRequestClose={this.props.onSave}//Wird nur für Android benötigt
|
||||
visible={visible}
|
||||
onRequestClose={onSave} //Wird nur für Android benötigt
|
||||
animationType='slide'>
|
||||
<View style={styles.container}>
|
||||
<TextInput style={styles.textInput} placeholder='Zitat' />
|
||||
<TextInput style={styles.textInput} placeholder='Autor/in' />
|
||||
<View style={styles.saveButton}>
|
||||
<TextInput
|
||||
style={[styles.textInput, { height: 150 }]} //Einzelne Styleelemente im Array festgelegt
|
||||
multiline={true}
|
||||
placeholder='Zitat'
|
||||
onChangeText={text => this.setState({ content: text })} />
|
||||
<Text title='TESTFELD'>
|
||||
{this.state.content}
|
||||
</Text>
|
||||
<TextInput
|
||||
style={styles.textInput}
|
||||
placeholder='Autor/in'
|
||||
onChangeText={text => this.setState({ author: text })} />
|
||||
<View
|
||||
style={styles.saveButton}>
|
||||
<Button
|
||||
title="Save"
|
||||
onPress={this.props.onSave} />
|
||||
onPress={() => onSave(content, author)} />
|
||||
</View>
|
||||
</View>
|
||||
</Modal>
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -29,7 +42,7 @@ const styles = StyleSheet.create({
|
|||
flex: 1,
|
||||
backgroundColor: '#eee',
|
||||
alignItems: 'center', //FlexBox Layout
|
||||
justifyContent: 'center',
|
||||
justifyContent: 'center'
|
||||
},
|
||||
saveButton: {
|
||||
position: 'absolute',
|
||||
|
|
Loading…
Reference in New Issue
Block a user