Resolve "Add Category Modal"

This commit is contained in:
Thomas Schleicher 2024-01-03 17:31:59 +00:00
parent d2837c12b3
commit 9204d6f235
10 changed files with 297 additions and 21 deletions

View file

@ -0,0 +1,39 @@
import { StyleSheet, Text, TouchableHighlight } from "react-native";
import { useTheme } from "../../app/contexts/ThemeContext";
export type NavigationButtonProperties = {
onPress?: () => void | undefined,
text: string,
}
const NavigationButton = (properties: NavigationButtonProperties) => {
const {colors} = useTheme();
return (
<TouchableHighlight
onPress={properties.onPress}
underlayColor={colors.elementSelectedColor}
style={[styles.touchableHighlightStyle, {backgroundColor: colors.elementDefaultColor}]}>
<Text style={[styles.buttonTextStyle, {color: colors.primaryText}]}>{properties.text}</Text>
</TouchableHighlight>
);
}
export default NavigationButton;
const styles = StyleSheet.create({
touchableHighlightStyle: {
borderRadius: 10,
marginVertical: 10,
marginHorizontal: 15,
paddingHorizontal: 20,
paddingVertical: 5,
},
buttonTextStyle: {
textAlign: "center",
fontSize: 30,
}
});