React-Native bulleted lists using flex-wrap -
i'm trying create bulleted list looks this:
but i'm ending instead:
react-native doesn't seem use of nested flex boxes. i'm not sure how express need 3 line elements (bullet, bolded text , normal text) displayed inline , wrap next line when necessary.
here react-native code:
var styles = stylesheet.create({ textwrapper: { flexwrap: 'wrap', alignitems: 'flex-start', flexdirection: 'row', }, textblock: { flexwrap: 'wrap', alignitems: 'flex-start', flexdirection: 'row' position: 'absolute', left: 10 }, boldtext: { fontweight: 'bold', }, normaltext: { } }); <view style={ styles.textwrapper }> <text>{'\u2022'}</text> <view style={ styles.textblock }> <text style={ styles.boldtext }>{categoryname + ':'}</text> <text style={ styles.normaltext }>{value}</text> </view> </view>
try wrapping in single text block:
<view style={ styles.textblock }> <text>{'\u2022'} <text style={ styles.boldtext }>{categoryname + ':'}</text> <text style={ styles.normaltext }>{value}</text> </text> </view>
Comments
Post a Comment