fix color for header in list

This commit is contained in:
ammarahm-ed
2020-12-16 20:49:39 +05:00
parent 674a08b778
commit 95b6ded321
2 changed files with 7 additions and 1 deletions

View File

@@ -91,7 +91,12 @@ const SimpleList = ({
justifyContent: 'space-between',
paddingHorizontal: 12,
height: 35,
backgroundColor: index === 1 ? colors.shade : colors.nav,
backgroundColor:
index === 1
? headerProps.color
? colors[headerProps.color]
: colors.shade
: colors.nav,
marginTop: index === 1 ? 0 : 5,
}}>
<TouchableWithoutFeedback

View File

@@ -196,6 +196,7 @@ export const Notes = ({route, navigation}) => {
params.type === 'tag'
? '#' + params.title
: params.title.slice(0, 1).toUpperCase() + params.title.slice(1),
color: params.type === 'color' ? params.title.toLowerCase() : null,
}}
loading={loading}
focused={() => navigation.isFocused()}