Skip to content

Instantly share code, notes, and snippets.

@behrends
Created July 4, 2018 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save behrends/8f8c2496bc7fc5509bac97d7186ab5ae to your computer and use it in GitHub Desktop.
Save behrends/8f8c2496bc7fc5509bac97d7186ab5ae to your computer and use it in GitHub Desktop.
13:55 - Modal mit TextInputs
import React, { Component } from 'react';
import { Modal, StyleSheet, Text, TextInput, View } from 'react-native';
export default class NewQuote extends Component {
render() {
return (
<Modal
visible={this.props.visible}
onRequestClose={this.props.onRequestClose}
>
<View style={styles.container}>
<TextInput
style={[styles.input, { height: '25%' }]}
placeholder="Zitat eingeben"
underlineColorAndroid="transparent"
/>
<TextInput
style={styles.input}
placeholder="Autor"
underlineColorAndroid="transparent"
/>
</View>
</Modal>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'flex-start',
alignItems: 'center',
paddingTop: 40
},
input: {
fontSize: 20,
borderWidth: 1,
borderColor: 'deepskyblue',
borderRadius: 4,
height: 50,
width: '80%',
marginBottom: 20,
padding: 10
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment