Resolve "Add Category Modal"
This commit is contained in:
parent
d2837c12b3
commit
9204d6f235
10 changed files with 297 additions and 21 deletions
39
components/common/button.tsx
Normal file
39
components/common/button.tsx
Normal 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,
|
||||
}
|
||||
});
|
||||
Reference in a new issue