|
@@ -6,22 +6,26 @@ export default function ActionEditor(props) {
|
|
|
if(!action.data || typeof action.data !== "object") action.data = {};
|
|
|
return (
|
|
|
<View style={styles.container}>
|
|
|
- <Text style={[styles.title, styles.capFirst]}>Type</Text>
|
|
|
- <TextInput style={styles.defaultInput}
|
|
|
- onChangeText={(text) => {
|
|
|
- action.type = text;
|
|
|
- props.onChange && props.onChange(action);
|
|
|
- setAction(action);
|
|
|
- }}
|
|
|
- value={action.type}/>
|
|
|
- <Text style={[styles.title, styles.capFirst]}>Data</Text>
|
|
|
- <TextInput style={styles.defaultInput}
|
|
|
- onChangeText={(text) => {
|
|
|
- action.data.route = text;
|
|
|
- props.onChange && props.onChange(action);
|
|
|
- setAction(action);
|
|
|
- }}
|
|
|
- value={action.data.route}/>
|
|
|
+ <View style={styles.row}>
|
|
|
+ <Text style={[styles.title, styles.capFirst]}>Type</Text>
|
|
|
+ <TextInput style={styles.defaultInput}
|
|
|
+ onChangeText={(text) => {
|
|
|
+ action.type = text;
|
|
|
+ props.onChange && props.onChange(action);
|
|
|
+ setAction(action);
|
|
|
+ }}
|
|
|
+ value={action.type}/>
|
|
|
+ </View>
|
|
|
+ <View style={styles.row}>
|
|
|
+ <Text style={[styles.title, styles.capFirst]}>Data</Text>
|
|
|
+ <TextInput style={styles.defaultInput}
|
|
|
+ onChangeText={(text) => {
|
|
|
+ action.data.route = text;
|
|
|
+ props.onChange && props.onChange(action);
|
|
|
+ setAction(action);
|
|
|
+ }}
|
|
|
+ value={action.data.route}/>
|
|
|
+ </View>
|
|
|
</View>
|
|
|
);
|
|
|
}
|
|
@@ -30,9 +34,12 @@ const styles = StyleSheet.create({
|
|
|
container:{
|
|
|
padding:24,
|
|
|
paddingTop: 0,
|
|
|
+ flexDirection: 'column'
|
|
|
+ },
|
|
|
+ row: {
|
|
|
flexDirection: 'row',
|
|
|
+ alignItems: 'baseline',
|
|
|
justifyContent: 'space-between',
|
|
|
- alignItems: 'baseline'
|
|
|
},
|
|
|
capFirst: {
|
|
|
fontSize: 14,
|