nvm, i solved it simply putting <View>
tag behind the button.
import React from 'react';
import {
Textual content,
StyleSheet,
ActivityIndicator,
View,
Pressable,
} from 'react-native';
import SvgIcon from '../../../property/google.svg';
import SvgButton from '../../../property/Button.svg';
const AtomGoogleButton = ({onPress, loading}) => {
return (
<>
<View
model={{
place: 'relative',
}}>
<Pressable onPress={onPress} model={kinds.socialButton}>
{loading ? (
<ActivityIndicator shade={'grey'} />
) : (
<>
<SvgIcon width={24} top={24} />
<Textual content model={kinds.socialButtonText}>Google</Textual content>
</>
)}
</Pressable>
<View
model={{
width: '100%',
paddingVertical: 24,
paddingHorizontal: 16,
borderRadius: 25,
prime: 7,
left: 2,
backgroundColor: 'black',
place: 'absolute',
zIndex: 0,
}}></View>
</View>
</>
);
};
const kinds = StyleSheet.create({
socialButton: {
// place: 'relative',
flexDirection: 'row',
alignItems: 'heart',
justifyContent: 'heart',
backgroundColor: 'white',
zIndex: 999,
paddingVertical: 12,
paddingHorizontal: 16,
borderRadius: 25,
// elevation: 2,
// shadowColor: 'rgba(0, 0, 0, 1)',
// shadowOffset: {width: 0, top: 2},
// shadowOpacity: 1,
// shadowRadius: 2,
borderWidth: 1.5,
// borderColor: '#000',
},
socialButtonText: {
marginLeft: 8,
fontSize: 16,
fontWeight: 'daring',
shade: 'black',
},
});
export default AtomGoogleButton;