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
If you want to apply width to View
based on <Text>
, you can do something like this :
<View style={styles.container}>
<Text>
{text}
</Text>
</View>
const styles = StyleSheet.create({
container: {
flexDirection:"row",
alignSelf:"flex-start",
paddingTop: Constants.statusBarHeight,
backgroundColor: '#ecf0f1',
padding: 8,
}
});
WORKING DEMO