|
@@ -6,22 +6,26 @@ export default function ActionEditor(props) {
|
|
if(!action.data || typeof action.data !== "object") action.data = {};
|
|
if(!action.data || typeof action.data !== "object") action.data = {};
|
|
return (
|
|
return (
|
|
<View style={styles.container}>
|
|
<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>
|
|
</View>
|
|
);
|
|
);
|
|
}
|
|
}
|
|
@@ -30,9 +34,12 @@ const styles = StyleSheet.create({
|
|
container:{
|
|
container:{
|
|
padding:24,
|
|
padding:24,
|
|
paddingTop: 0,
|
|
paddingTop: 0,
|
|
|
|
+ flexDirection: 'column'
|
|
|
|
+ },
|
|
|
|
+ row: {
|
|
flexDirection: 'row',
|
|
flexDirection: 'row',
|
|
|
|
+ alignItems: 'baseline',
|
|
justifyContent: 'space-between',
|
|
justifyContent: 'space-between',
|
|
- alignItems: 'baseline'
|
|
|
|
},
|
|
},
|
|
capFirst: {
|
|
capFirst: {
|
|
fontSize: 14,
|
|
fontSize: 14,
|