ebanutsya

This commit is contained in:
2023-10-29 06:54:42 +03:00
parent 0bc1835405
commit cd89a70b17
15 changed files with 346 additions and 88 deletions

View File

@@ -3,6 +3,7 @@ import {StyleSheet, TouchableOpacity, Text, View, StyleProp, ViewStyle, GestureR
import {responsiveHeight, responsiveWidth} from "react-native-responsive-dimensions";
import {RFPercentage} from "react-native-responsive-fontsize";
import DText from "../DText/DText";
import DTitle from "../DTitle/DTitle";
type Props = {
label: string;
@@ -15,10 +16,11 @@ type Props = {
const BasicButton: FC<Props> = ({label, onPress, containerStyle, style, isUnset = false, disabled = false}) => {
return (
<TouchableOpacity style={{flex: 1}} disabled={disabled} onPress={onPress}>
<View style={[styles.container, style, disabled ? {backgroundColor: "#A0A0A0"} : {}]}>
<DText style={styles.text}>{label}</DText>
<TouchableOpacity style={containerStyle} disabled={disabled} onPress={onPress}>
<View style={[styles.container, style, disabled ? {backgroundColor: "#A0A0A0"} : {}, containerStyle]}>
<View style={styles.textWrapper}>
<DText style={styles.text}>{label}</DText>
</View>
</View>
</TouchableOpacity>
@@ -33,15 +35,15 @@ const styles = StyleSheet.create({
alignContent: "center",
backgroundColor: '#2478F8',
borderRadius: responsiveWidth(1),
padding: responsiveWidth(2),
flex: 1
padding: responsiveWidth(3),
},
text: {
color: "white",
fontSize: RFPercentage(2),
textAlignVertical: "center",
textAlign: "center"
}
textAlign: "center",
},
textWrapper: {}
});
export default BasicButton;