Skip to content

Commit

Permalink
Merge pull request #1019 from akvo/feature/981-selected-items-style
Browse files Browse the repository at this point in the history
[#981] Update selected color text style
  • Loading branch information
dedenbangkit authored Jan 19, 2024
2 parents 39013f9 + ef0483b commit 7de241f
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions app/src/form/support/OptionItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,21 @@ import { Text } from 'react-native';
const OptionItem = ({ label, color, name }, active) => {
return (
<View style={[{ padding: 3 }]}>
<View style={[{ backgroundColor: active ? '#0047AB' : color || '#FFF', padding: 15 }]}>
<Text style={{ fontWeight: color ? 'bold' : 'normal', color: color ? 'white' : 'black' }}>
<View
style={[
{
padding: 8,
backgroundColor: color ? color : active ? '#bcbcbc' : '#FFF',
borderRadius: color ? 5 : 0,
},
]}
>
<Text
style={{
fontWeight: color ? 'bold' : 'normal',
color: color || active ? 'white' : 'black',
}}
>
{label || name}
</Text>
</View>
Expand Down

0 comments on commit 7de241f

Please sign in to comment.