How to set the `borderBottomColor` of `ListItem`
See original GitHub issueI want to set the borderBottomColor of the ListItem, but check out the API and did not tell me.
“react-native-elements”: “^0.18.2”,
code:
const list2 = [
{
name:
'Amy Farha Amy Farha Amy Farha Amy Farha Amy Farha Amy Farha Amy Farha Amy Farha',
avatar_url:
'https://s3.amazonaws.com/uifaces/faces/twitter/ladylexy/128.jpg',
subtitle: 'Vice President'
},
{
name: 'Chris Jackson',
avatar_url:
'https://s3.amazonaws.com/uifaces/faces/twitter/adhamdannaway/128.jpg',
subtitle: 'Vice Chairman'
},
{
name: 'Amanda Martin',
avatar_url: 'https://s3.amazonaws.com/uifaces/faces/twitter/brynn/128.jpg',
subtitle: 'CEO'
},
{
name: 'Christy Thomas',
avatar_url:
'https://s3.amazonaws.com/uifaces/faces/twitter/kfriedson/128.jpg',
subtitle: 'Lead Developer'
},
{
name: 'Melissa Jones',
avatar_url:
'https://s3.amazonaws.com/uifaces/faces/twitter/nuraika/128.jpg',
subtitle: 'CTO'
}
];
<List containerStyle={{ marginBottom: 20, borderColor: '#eee' }}>
{list2.map((item, index) => (
<ListItem
containerStyle={{ borderColor: '#eee' }}
wrapperStyle={{ borderColor: '#eee' }}
roundAvatar
avatar={{ uri: item.avatar_url }}
key={index}
onPress={log()}
title={item.name}
subtitle={item.subtitle}
titleNumberOfLines={1}
badge={{
value: 3,
textStyle: { color: 'orange' },
containerStyle: { marginTop: 0 }
}}
/>
))}
</List>
Issue Analytics
- State:
- Created 6 years ago
- Comments:13
Top Results From Across the Web
how to add style (add bottom border )in all li in react?
I want to add style in all li (add bottom border) .one way is to add this className={classes.sideBar__listItem__element} in all ListItem is ...
Read more >react native - changing border color of list item or list - mitzen
... you have need to set List's containerStyle -> borderColor and ListeItem's containerStyle ->BorderBottomColor to your desired color.
Read more ><display-listitem> - CSS: Cascading Style Sheets | MDN
The list-item keyword causes the element to generate a ::marker pseudo-element with the content specified by its list-style properties (for ...
Read more >Changing the bottom-border color in a List View - Telerik
I am trying the following code to change the border bottom color of an 'li' element in a list-view. http://dojo.telerik.com/ApIp/27.
Read more >Borders - MUI System
borderBottomColor, borderBottomColor, border-bottom-color, palette. borderLeftColor, borderLeftColor, border-left-color, palette.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey @fengyun2 You can use the
containerStyle
props on theListItem
to control the border color 👍@nihp can you create a new issue