Skip to content

Commit 3926168

Browse files
committed
fix: image gallery component theme arrangment
1 parent cfb9d81 commit 3926168

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

package/src/components/ImageGallery/components/AnimatedGalleryImage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const AnimatedGalleryImage = React.memo(
5151
* image as it is scaled. If the scale is less than one they stay in
5252
* place as to not come into the screen when the image shrinks.
5353
*/
54-
const AnimatedGalleryImageStyle = useAnimatedStyle<ImageStyle>(() => {
54+
const animatedGalleryImageStyle = useAnimatedStyle<ImageStyle>(() => {
5555
const xScaleOffset = -7 * screenWidth * (0.5 + index);
5656
const yScaleOffset = -screenHeight * 3.5;
5757
return {
@@ -91,8 +91,7 @@ export const AnimatedGalleryImage = React.memo(
9191
resizeMode={'contain'}
9292
source={{ uri: photo.uri }}
9393
style={[
94-
style,
95-
AnimatedGalleryImageStyle,
94+
animatedGalleryImageStyle,
9695
{
9796
transform: [
9897
{ scaleX: -1 },
@@ -103,6 +102,7 @@ export const AnimatedGalleryImage = React.memo(
103102
{ scale: oneEighth },
104103
],
105104
},
105+
style,
106106
]}
107107
/>
108108
);

package/src/components/ImageGallery/components/AnimatedGalleryVideo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ export const AnimatedGalleryVideo = React.memo(
173173
<Animated.View
174174
accessibilityLabel='Image Gallery Video'
175175
style={[
176-
style,
177176
animatedViewStyles,
178177
{
179178
transform: [
@@ -185,6 +184,7 @@ export const AnimatedGalleryVideo = React.memo(
185184
{ scale: oneEighth },
186185
],
187186
},
187+
style,
188188
]}
189189
>
190190
{isVideoPackageAvailable() && (

package/src/components/ImageGallery/components/ImageGalleryFooter.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export const ImageGalleryFooterWithContext = <
181181
pointerEvents={'box-none'}
182182
style={styles.wrapper}
183183
>
184-
<ReanimatedSafeAreaView style={[container, footerStyle, { backgroundColor: white }]}>
184+
<ReanimatedSafeAreaView style={[container, { backgroundColor: white }, footerStyle]}>
185185
{photo.type === 'video' ? (
186186
videoControlElement ? (
187187
videoControlElement({ duration, onPlayPause, paused, progress, videoRef })
@@ -195,7 +195,7 @@ export const ImageGalleryFooterWithContext = <
195195
/>
196196
)
197197
) : null}
198-
<View style={[styles.innerContainer, innerContainer, { backgroundColor: white }]}>
198+
<View style={[styles.innerContainer, { backgroundColor: white }, innerContainer]}>
199199
{leftElement ? (
200200
leftElement({ openGridView, photo, share, shareMenuOpen })
201201
) : (

package/src/components/ImageGallery/components/ImageGalleryVideoControl.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export const ImageGalleryVideoControl = React.memo(
7373
return (
7474
<View style={[styles.videoContainer, videoContainer]}>
7575
<TouchableOpacity accessibilityLabel='Play Pause Button' onPress={handlePlayPause}>
76-
<View style={[styles.roundedView, roundedView, { backgroundColor: static_white }]}>
76+
<View style={[styles.roundedView, { backgroundColor: static_white }, roundedView]}>
7777
{paused ? (
7878
<Play accessibilityLabel='Play Icon' fill={static_black} height={32} width={32} />
7979
) : (
@@ -83,7 +83,7 @@ export const ImageGalleryVideoControl = React.memo(
8383
</TouchableOpacity>
8484
<Text
8585
accessibilityLabel='Progress Duration'
86-
style={[styles.durationTextStyle, durationTextStyle, { color: black }]}
86+
style={[styles.durationTextStyle, { color: black }, durationTextStyle]}
8787
>
8888
{progressDuration ? progressDuration : '00:00'}
8989
</Text>
@@ -97,7 +97,7 @@ export const ImageGalleryVideoControl = React.memo(
9797
/>
9898
<Text
9999
accessibilityLabel='Video Duration'
100-
style={[styles.durationTextStyle, durationTextStyle, { color: black }]}
100+
style={[styles.durationTextStyle, { color: black }, durationTextStyle]}
101101
>
102102
{videoDuration ? videoDuration : '00:00'}
103103
</Text>

0 commit comments

Comments
 (0)