Resolve "development build fix"

This commit is contained in:
Thomas Schleicher 2023-12-08 22:13:29 +00:00
parent bdf6a5fd34
commit 9c42f89b20
6 changed files with 24 additions and 169 deletions

View file

@ -1,27 +1,21 @@
import { View, Text, ViewProps, StyleSheet, TouchableOpacity } from 'react-native'
import { AntDesign } from '@expo/vector-icons'
import React from 'react'
import { StyleSheet, TouchableOpacity, ViewProps } from 'react-native'
import { useThemeColor } from '../../../hooks/hooks'
type PlusProps = ViewProps & {onPress? : ()=> void | undefined}
const Plus = (props : PlusProps) => {
return (
const accentColor = useThemeColor("accentColor");
const primaryText = useThemeColor("primaryText");
<TouchableOpacity onPress={props.onPress} style={[style.plus, props.style]}>
{props.children}
<AntDesign name='plus' color={"white"} size={20}></AntDesign>
</TouchableOpacity>
)
}
const style = StyleSheet.create({
const style = StyleSheet.create({
plus:{
position: "absolute",
right: 20,
bottom: 20,
zIndex: 1,
backgroundColor: "orange",
backgroundColor: accentColor,
padding: 20,
borderRadius: 500,
height: 60,
@ -30,5 +24,16 @@ const style = StyleSheet.create({
justifyContent: "center",
flex:1
}
})
export default Plus
});
return (
<TouchableOpacity onPress={props.onPress} style={[style.plus, props.style]}>
{props.children}
<AntDesign name='plus' color={primaryText} size={20}></AntDesign>
</TouchableOpacity>
);
};
export default Plus;