Skip to content

Commit

Permalink
Move button to the bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan committed May 2, 2024
1 parent 413dc28 commit a968d8c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
18 changes: 9 additions & 9 deletions src/components/Lightbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@ const getLightboxFooterComponent =
) =>
() => (
<SafeAreaView style={styles.lightboxFooterContainer}>
{onPressDelete && (
<View style={styles.editButtons}>
<IconButton
testID="delete-photo"
icon={{ name: 'trash-alt', size: 20, color: theme.color.white }}
onPress={onPressDelete}
/>
</View>
)}
<View style={styles.lightboxFooter}>
{title && (
<View style={styles.footerItem}>
Expand All @@ -69,6 +60,15 @@ const getLightboxFooterComponent =
)}
{content && <View style={styles.footerItem}>{content}</View>}
</View>
{onPressDelete && (
<View style={styles.editButtons}>
<IconButton
testID="delete-photo"
icon={{ name: 'trash-alt', size: 20, color: theme.color.white }}
onPress={onPressDelete}
/>
</View>
)}
</SafeAreaView>
)

Expand Down
16 changes: 8 additions & 8 deletions src/components/__tests__/__snapshots__/Lightbox.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1946,6 +1946,14 @@ exports[`Lightbox Rendering With a delete button 1`] = `
}
}
>
<View
style={
{
"paddingHorizontal": 16,
"paddingVertical": 8,
}
}
/>
<View
style={
{
Expand Down Expand Up @@ -1998,14 +2006,6 @@ exports[`Lightbox Rendering With a delete button 1`] = `
/>
</View>
</View>
<View
style={
{
"paddingHorizontal": 16,
"paddingVertical": 8,
}
}
/>
</RCTSafeAreaView>
</View>
</View>
Expand Down

0 comments on commit a968d8c

Please sign in to comment.