React-native view auto width by text inside

前端 未结 7 646
刺人心
刺人心 2020-12-12 15:09

As i know, react-native stylesheet doesn\'t supports min-width/max-width property.

I have a view and text inside. The view in auto width doesn\'t resize by inherit t

7条回答
  •  生来不讨喜
    2020-12-12 15:13

        
              { this.setModalVisible(!this.state.visible) }}>
                     Close
              
        
    const styles = StyleSheet.create({
     imageCancel: {
             height: 'auto',
             width: 'auto',
             justifyContent:'center',
             backgroundColor: '#000000',
             alignItems: 'flex-end',
        },
         textCancel: {
            paddingTop:25,
            paddingRight:25,
            fontSize : 18,
            color : "#ffffff",
            height: 50,
            },
     }};
    

提交回复
热议问题