Underline current workout in SetForm

This commit is contained in:
Brandon Presley 2022-08-25 14:16:30 +12:00
parent 804c89393f
commit 8ae8de9612
1 changed files with 9 additions and 5 deletions

View File

@ -90,12 +90,16 @@ export default function SetForm({
)}
<Text>
{workouts?.map((workout, index) => (
<Text
key={workout}
style={{fontWeight: workout === name ? 'bold' : 'normal'}}>
{workout}
<React.Fragment key={workout}>
<Text
style={{
fontWeight: workout === name ? 'bold' : 'normal',
textDecorationLine: workout === name ? 'underline' : 'none',
}}>
{workout}
</Text>
{index === workouts.length - 1 ? '.' : ', '}
</Text>
</React.Fragment>
))}
</Text>
</ScrollView>