ebanutsya
This commit is contained in:
@@ -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"
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user