Import_this
import {AppRegistry, Text, View, Button, StyleSheet} from 'react-native';
प्रतिक्रिया-मूलनिवासी बटन शैली काम नहीं
यह मेरा बटन कोड लेकिन शैली से काम नहीं कर हरे प्रतिक्रिया ...
<Button
onPress={this.onPress.bind(this)}
title={"Go Back"}
style={{color: 'red', marginTop: 10, padding: 10}}
/>
इसके अलावा, मैं इस कोड से कोशिश थी
<Button
containerStyle={{padding:10, height:45, overflow:'hidden',
borderRadius:4, backgroundColor: 'white'}}
style={{fontSize: 20, color: 'green'}}
onPress={this.onPress.bind(this)} title={"Go Back"}
> Press me!
</Button>
अद्यतन प्रश्न:
इसके अलावा, मैं इस तरह से कोशिश ..
<Button
onPress={this.onPress.bind(this)}
title={"Go Back"}
style={styles.buttonStyle}
>ku ka</Button>
शैली थी
const styles = StyleSheet.create({
buttonStyle: {
color: 'red',
marginTop: 20,
padding: 20,
backgroundColor: 'green'
}
});
लेकिन कोई बाहर: मेरे फोन की स्क्रीनशॉट: -
'बटन' क्या आप कस्टम घटक या प्रतिक्रिया बटन घटक का उपयोग करते हैं? –
शायद 'बटन –
पर प्रतिक्रिया दें, इसमें 'शैली' संपत्ति नहीं है। कृपया एक बार जांचें। –