这是我创建的容器外观:
这是我想要的款式.
我怎么能这么做.代码是:
<View>
{
usersInfo.map((item) =>
<View key={item.id} style={{}}>
{Object.entries(item.intrest).map(([interestName, interestValue]) => (
<View key={interestName} style={{ backgroundColor: interestValue === 'Games Online' ? '#6B7AED' : interestValue === 'Music' ? '#EE544A' : interestValue === 'Concert' ? '#FF8D5D' : interestValue === 'Movie' ? '#29D697' : '#6B7AED', borderRadius: 18,}}>
<Text style={{ color: '#FFF', fontSize: 14, fontWeight: '500', paddingHorizontal: 15,paddingVertical: 7 }}>{interestValue}</Text>
</View>
))}
</View>
)
}
</View>
我想按照给出的样品来设计我的集装箱.