Add change image button and fix margin in workout

Closes #26, #27.
This commit is contained in:
Brandon Presley 2022-09-19 13:20:24 +12:00
parent 8b479b299f
commit d05c815a79
1 changed files with 13 additions and 9 deletions

View File

@ -85,21 +85,25 @@ export default function EditWorkout() {
return (
<View style={{padding: PADDING}}>
<ScrollView style={{height: '90%'}}>
{uri ? (
{uri && (
<>
<Pressable style={{marginBottom: MARGIN}} onPress={changeImage}>
<Card.Cover source={{uri}} />
</Pressable>
<Button onPress={onRemoveImage}>Remove image</Button>
<Button
icon="trash"
style={{marginBottom: MARGIN}}
onPress={onRemoveImage}>
Remove image
</Button>
</>
) : (
<Button
style={{marginBottom: MARGIN}}
onPress={changeImage}
icon="image">
Image
</Button>
)}
<Button
style={{marginBottom: MARGIN}}
onPress={changeImage}
icon="image">
Change image
</Button>
<MassiveInput
label={params.value.name || 'Name'}
value={name}