diff --git a/src/components/Deck.tsx b/src/components/Deck.tsx index 797cf68..243aa4f 100644 --- a/src/components/Deck.tsx +++ b/src/components/Deck.tsx @@ -1,5 +1,5 @@ import { makeStyles, Text } from '@rneui/themed'; -import { TouchableHighlight, View } from 'react-native'; +import { TouchableNativeFeedback, View } from 'react-native'; import React from 'react'; import { LinearProgress } from '@rneui/themed'; import { margins } from '../config'; @@ -20,40 +20,41 @@ const Deck = ({ name, progress, containerBgColor, pbColor, pbBackgroundColor, te const styles = useStyles(); return ( - - <> - - {name} - - - - - Completion - - - {progress * 100}% + + + + + {name} + + + + Completion + + + {progress * 100}% + + - - + + ); }; const useStyles = makeStyles((theme) => ({ container: { - paddingHorizontal: 25, - paddingVertical: 20, borderRadius: 15, marginHorizontal: margins.window_hor, + overflow: 'hidden', + }, + contentContainer: { + paddingHorizontal: 25, + paddingVertical: 20, }, text: { color: theme.colors.white, diff --git a/src/components/Touchable.tsx b/src/components/Touchable.tsx deleted file mode 100644 index 7e6a347..0000000 --- a/src/components/Touchable.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { ColorValue, TouchableNativeFeedback } from 'react-native'; -import React from 'react'; -import { makeStyles } from '@rneui/themed'; - -type Props = { - children: React.ReactElement; - onPress?: () => void; - rippleColor?: string; -}; - -const Touchable = ({ onPress, children, rippleColor }: Props) => { - const styles = useStyles(); - - return ( - - {children} - - ); -}; - -const useStyles = makeStyles((theme) => ({ - touchableContainer: { - color: theme.colors.touchable, - }, -})); - -export default Touchable; diff --git a/src/navigation/AppNavigator.tsx b/src/navigation/AppNavigator.tsx index fba97cb..fc2f177 100644 --- a/src/navigation/AppNavigator.tsx +++ b/src/navigation/AppNavigator.tsx @@ -10,7 +10,10 @@ const RootStack = createNativeStackNavigator(); export default function AppNavigator() { const styles = useStyles(); return ( - + diff --git a/src/views/SetsScreen.tsx b/src/views/SetsScreen.tsx index 342ac0c..edfd372 100644 --- a/src/views/SetsScreen.tsx +++ b/src/views/SetsScreen.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { View } from 'react-native'; +import { TouchableNativeFeedback, View } from 'react-native'; import { makeStyles, Text, Button, useThemeMode, useTheme } from '@rneui/themed'; import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import { NavProps } from '../config/routes'; @@ -18,7 +18,36 @@ export default function SetsScreen({ navigation }: NavProps) { return ( - Sets + + console.log('hekk')}> + + Click me + + + + ); } diff --git a/src/views/SettingsScreen.tsx b/src/views/SettingsScreen.tsx index 6743327..873b1d9 100644 --- a/src/views/SettingsScreen.tsx +++ b/src/views/SettingsScreen.tsx @@ -2,12 +2,10 @@ import { makeStyles, Text, ThemeMode, useTheme, useThemeMode } from '@rneui/them import { Divider } from '@rneui/themed'; import { Switch } from '@rneui/themed'; import React, { useState } from 'react'; -import { View } from 'react-native'; +import { ColorValue, TouchableNativeFeedback, View } from 'react-native'; import Icon from 'react-native-vector-icons/MaterialIcons'; - import ChangeLanguageDialog from '../components/ChangeLanguageDialog'; import TitleBar from '../components/TitleBar'; -import Touchable from '../components/Touchable'; import { iconSize, margins } from '../config'; import { NavProps } from '../config/routes'; import { getAppState } from '../database'; @@ -23,9 +21,10 @@ type MenuProps = { const Menu = ({ Icon1, title, subtitle, Icon2, onPress }: MenuProps) => { const styles = useStyles(); + const { theme } = useTheme(); return ( - + {Icon1} @@ -36,7 +35,7 @@ const Menu = ({ Icon1, title, subtitle, Icon2, onPress }: MenuProps) => { {Icon2} - + ); };