From eaa5ce04fcfc5ffca846be691a17d0b321f33ab7 Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Thu, 15 Jul 2021 21:21:33 +0200 Subject: made the tweak thing toggleable --- app/components/tweaks/tweaks.tsx | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) (limited to 'app/components/tweaks') diff --git a/app/components/tweaks/tweaks.tsx b/app/components/tweaks/tweaks.tsx index 778cfd0..11b71e6 100644 --- a/app/components/tweaks/tweaks.tsx +++ b/app/components/tweaks/tweaks.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import { ScrollView, StyleProp, Switch, TextStyle, TouchableOpacity, View, ViewStyle, StyleSheet } from "react-native" +import { ScrollView, StyleProp, Switch, TextStyle, TouchableOpacity, View, ViewStyle, StyleSheet, Button } from "react-native" import { observer } from "mobx-react-lite" import { color, typography } from "../../theme" import { Text } from "../" @@ -131,10 +131,18 @@ export const Tweaks = observer(function Tweaks(props: TweaksProps): JSX.Element ); } + const [tweaks, setTweaks] = useState(true); if (true) { + if(tweaks){ return( - + + {setTweaks(false)}}> + X + + + - ) + ); + } else { + return( + {setTweaks(true)}} + style={{position: "absolute", top: 50, left: 50, width: 30, color: "#ffffff", zIndex: 100}}> + O + + ) + } } else { return ( @@ -207,8 +224,7 @@ export const Tweaks = observer(function Tweaks(props: TweaksProps): JSX.Element const styles = StyleSheet.create ({ container: { flex: 1, - backgroundColor: '#F5FCFF', - paddingTop: 10, + backgroundColor: '#111111', position: "absolute", zIndex: 100, left: 50, @@ -223,8 +239,9 @@ const styles = StyleSheet.create ({ paddingLeft: 20, }, header: { - backgroundColor: '#F5FCFF', + backgroundColor: '#111111', padding: 10, + paddingBottom: 20, textAlign: "left", }, headerText: { @@ -235,13 +252,13 @@ const styles = StyleSheet.create ({ }, content: { padding: 20, - backgroundColor: '#fff', + backgroundColor: '#000000', }, active: { - backgroundColor: 'rgba(255,255,255,1)', + backgroundColor: 'rgba(0,0,0,1)', }, inactive: { - backgroundColor: 'rgba(245,252,255,1)', + backgroundColor: 'rgba(20,20,20,1)', }, selectors: { marginBottom: 10, @@ -249,7 +266,7 @@ const styles = StyleSheet.create ({ justifyContent: 'center', }, selector: { - backgroundColor: '#F5FCFF', + backgroundColor: '#111111', padding: 10, }, activeSelector: { -- cgit v1.2.3