Javascript 在React Native Elements ListItem按钮周围填充(根据文档)
在ListItem()的React Native Elements文档中,ListItem的按钮之间有填充,并且是四舍五入的 但是,当我尝试执行以下操作时(直接从文档中),它不会产生相同的样式:Javascript 在React Native Elements ListItem按钮周围填充(根据文档),javascript,react-native,react-native-elements,Javascript,React Native,React Native Elements,在ListItem()的React Native Elements文档中,ListItem的按钮之间有填充,并且是四舍五入的 但是,当我尝试执行以下操作时(直接从文档中),它不会产生相同的样式: <ListItem Component={TouchableScale} friction={90} // tension={100} // These props are passed to the parent component (here TouchableScale) a
<ListItem
Component={TouchableScale}
friction={90} //
tension={100} // These props are passed to the parent component (here TouchableScale)
activeScale={0.95} //
linearGradientProps={{
colors: ['#FF9800', '#F44336'],
start: [1, 0],
end: [0.2, 0],
}}
ViewComponent={LinearGradient} // Only if no expo
leftAvatar={{ rounded: true, source: { uri: avatar_url } }}
title="Chris Jackson"
titleStyle={{ color: 'white', fontWeight: 'bold' }}
subtitleStyle={{ color: 'white' }}
subtitle="Vice Chairman"
chevronColor="white"
chevron
/>
此外,我尝试添加垫和分隔道具,但这并没有产生正确的外观
如何设置单个ListItem组件的样式以匹配此样式?根据React Native Elements文档--所有组件都可以使用containerStyle属性单独设置样式 以下内容作为列表项中的道具添加,以满足上述要求:
containerStyle = {{ marginLeft: 5,
marginRight: 5,
marginTop: 10,
borderRadius: 10, // adds the rounded corners
backgroundColor: '#fff' }}
根据React Native Elements文档--所有组件都可以使用containerStyle属性单独设置样式 以下内容作为列表项中的道具添加,以满足上述要求:
containerStyle = {{ marginLeft: 5,
marginRight: 5,
marginTop: 10,
borderRadius: 10, // adds the rounded corners
backgroundColor: '#fff' }}