React-native-paper: List.Accordion Expanded Title Color

Created on 25 Mar 2019  路  4Comments  路  Source: callstack/react-native-paper

Describe the feature

It seems like <List.Accordion /> expanded title cannot be styled and it is based on theme color. I am not sure if this is a design choice or just hasn't been an option thus far.

Motivation

It would be nice if the accordion title color when expanded, could be passed in vs. based on theme.colors.primary.

https://github.com/callstack/react-native-paper/blob/master/src/components/List/ListAccordion.js#L158

color: expanded ? theme.colors.primary : titleColor,

https://callstack.github.io/react-native-paper/list-accordion.html

Related Issues

None.

Most helpful comment

@timothystewart6 you can pass theme prop to List.Accordion to customize it.

theme={{ colors: { primary: '#fff' }}}

All 4 comments

I can contribute this enhancement if needed. I just wanted to open an issue before a PR. Thank you!

@timothystewart6 you can pass theme prop to List.Accordion to customize it.

theme={{ colors: { primary: '#fff' }}}

Thank you so much! I didn't think of overriding the theme prop for this one instance. I will close this. Thanks again!

Just beware it overrides it for children too, so you have to revert back to primary for children (if that's your intent).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ButuzGOL picture ButuzGOL  路  3Comments

alikazemkhanloo picture alikazemkhanloo  路  4Comments

tonyxiao picture tonyxiao  路  3Comments

knobandre picture knobandre  路  4Comments

scottybo picture scottybo  路  3Comments