Display: Inline Equivalent in React Native

后端 未结 2 1407
旧时难觅i
旧时难觅i 2021-01-31 02:27

It seems as though I am having problems with creating a display: inline styling equivalent with flexbox. So far I have achieved the following (where the red and blue lines are g

相关标签:
2条回答
  • 2021-01-31 02:41

    This works for me:

    import {View, Text} from 'react-native';
    
    <View style={styles.container}>
     <Text>Hello</Text>
    </View>
    
    const styles = StyleSheet.create({
       container: {
         flexDirection: 'row', 
         alignSelf: 'flex-start'
       }
    });
    
    0 讨论(0)
  • 2021-01-31 02:46

    Needed to change the styling to the following:

    //container style wrapper for scrollview
        footerWrapper: {
            flexWrap: 'wrap', 
            alignItems: 'flex-start',
            flexDirection:'row',
        },
        //non-container style wrapper for scrollview
        footerWrapperNC: {
            flexDirection:'column',
        },
    
    0 讨论(0)
提交回复
热议问题