ebanutsya

This commit is contained in:
2023-10-28 08:08:37 +03:00
parent 37d3fb5a78
commit 0bc1835405
19 changed files with 435 additions and 180 deletions

View File

@@ -10,15 +10,16 @@ type Props = {
containerStyle?: StyleProp<ViewStyle>;
isUnset?: boolean;
onPress?: (event: GestureResponderEvent) => void
disabled?: boolean
};
const BasicButton: FC<Props> = ({label, onPress, containerStyle, style, isUnset = false}) => {
const BasicButton: FC<Props> = ({label, onPress, containerStyle, style, isUnset = false, disabled = false}) => {
return (
<TouchableOpacity onPress={onPress}>
<TouchableOpacity style={{flex: 1}} disabled={disabled} onPress={onPress}>
<View style={[styles.container, style]}>
<DText style={styles.text}>{label}</DText>
</View>
<View style={[styles.container, style, disabled ? {backgroundColor: "#A0A0A0"} : {}]}>
<DText style={styles.text}>{label}</DText>
</View>
</TouchableOpacity>
);
@@ -33,11 +34,13 @@ const styles = StyleSheet.create({
backgroundColor: '#2478F8',
borderRadius: responsiveWidth(1),
padding: responsiveWidth(2),
flex: 1
},
text: {
color: "white",
fontSize: RFPercentage(2),
textAlignVertical: "center",
textAlign: "center"
}
});