Skip to content

Commit

Permalink
Checkmark dynamically appears, color matches
Browse files Browse the repository at this point in the history
Updated the button to only appear if you can verify the trip.
Button color now matches the "inferred trip" data.
  • Loading branch information
the-bay-kay committed Oct 2, 2023
1 parent 7f6b737 commit d3f8970
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions www/js/survey/multilabel/MultiLabelButtonGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,12 @@ const MultilabelButtonGroup = ({ trip, buttonsInline=false }) => {
)
})}
</View>
<View style={{marginTop:'1rem'}}>
<IconButton icon='check-bold' mode='outlined' size={18} onPress={verifyTrip}
disabled={trip.verifiability != 'can-verify'}
style={{width: 24, height: 24, margin: 3}}/>
</View>
{trip.verifiability === 'can-verify' && (
<View style={{marginTop:'1rem'}}>
<IconButton icon='check-bold' mode='outlined' size={18} onPress={verifyTrip}
style={{width: 24, height: 24, margin: 3, backgroundColor: colors.secondaryContainer}}/>
</View>
)}
</View>
<Modal visible={modalVisibleFor != null} transparent={true} onDismiss={() => dismiss()}>
<Dialog visible={modalVisibleFor != null} onDismiss={() => dismiss()}>
Expand Down

0 comments on commit d3f8970

Please sign in to comment.