...
 
Commits (2)
......@@ -55,11 +55,9 @@ exports[`ForgotPassword component should renders correctly 1`] = `
</Text>
<View
style={
Array [
Object {
"marginBottom": 10,
},
]
Object {
"marginBottom": 10,
}
}
>
<View
......
......@@ -85,11 +85,9 @@ exports[`ForgotScreen component should renders correctly 1`] = `
</Text>
<View
style={
Array [
Object {
"marginBottom": 10,
},
]
Object {
"marginBottom": 10,
}
}
>
<View
......
......@@ -46,11 +46,9 @@ exports[`LoginForm component should renders correctly 1`] = `
</Text>
<View
style={
Array [
Object {
"marginBottom": 10,
},
]
Object {
"marginBottom": 10,
}
}
>
<View
......@@ -123,11 +121,9 @@ exports[`LoginForm component should renders correctly 1`] = `
<View>
<View
style={
Array [
Object {
"marginBottom": 10,
},
]
Object {
"marginBottom": 10,
}
}
>
<View
......
......@@ -136,11 +136,9 @@ exports[`RegisterForm component should renders correctly 1`] = `
</View>
<View
style={
Array [
Object {
"marginBottom": 10,
},
]
Object {
"marginBottom": 10,
}
}
>
<View
......@@ -212,11 +210,9 @@ exports[`RegisterForm component should renders correctly 1`] = `
</View>
<View
style={
Array [
Object {
"marginBottom": 10,
},
]
Object {
"marginBottom": 10,
}
}
>
<View
......@@ -288,11 +284,9 @@ exports[`RegisterForm component should renders correctly 1`] = `
</View>
<View
style={
Array [
Object {
"marginBottom": 10,
},
]
Object {
"marginBottom": 10,
}
}
>
<View
......
import React, {Component} from 'react';
import {StyleSheet, Text} from 'react-native';
import IconMC from 'react-native-vector-icons/MaterialCommunityIcons';
import {Tooltip} from 'react-native-elements';
import { ScrollView } from 'react-native-gesture-handler';
// workaround for android
import Tooltip from "rne-modal-tooltip";
export default class InfoPopup extends Component {
render() {
......
......@@ -122,16 +122,18 @@ export default class Input extends Component {
* Render
*/
render() {
const optional = (<Text style={[styles.optional]}>{"Optional"}</Text>);
const optional = this.props.optional ? (
<Text style={[styles.optional]}>{'Optional'}</Text>
) : null;
return (
<View style={[CS.marginBottom2x]}>
<View style={CS.marginBottom2x}>
<View style={[styles.row, CS.marginBottom]}>
<View style={styles.row}>
<Text style={[styles.label]}>{this.props.placeholder}</Text>
{this.props.info && <InfoPopup info={this.props.info} />}
</View>
{this.props.optional && optional}
{optional}
</View>
{this.renderInput()}
</View>
......