Skip to content

Commit

Permalink
fix: image gallery component theme arrangment
Browse files Browse the repository at this point in the history
  • Loading branch information
khushal87 committed Aug 8, 2024
1 parent cfb9d81 commit 3926168
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const AnimatedGalleryImage = React.memo(
* image as it is scaled. If the scale is less than one they stay in
* place as to not come into the screen when the image shrinks.
*/
const AnimatedGalleryImageStyle = useAnimatedStyle<ImageStyle>(() => {
const animatedGalleryImageStyle = useAnimatedStyle<ImageStyle>(() => {
const xScaleOffset = -7 * screenWidth * (0.5 + index);
const yScaleOffset = -screenHeight * 3.5;
return {
Expand Down Expand Up @@ -91,8 +91,7 @@ export const AnimatedGalleryImage = React.memo(
resizeMode={'contain'}
source={{ uri: photo.uri }}
style={[
style,
AnimatedGalleryImageStyle,
animatedGalleryImageStyle,
{
transform: [
{ scaleX: -1 },
Expand All @@ -103,6 +102,7 @@ export const AnimatedGalleryImage = React.memo(
{ scale: oneEighth },
],
},
style,
]}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ export const AnimatedGalleryVideo = React.memo(
<Animated.View
accessibilityLabel='Image Gallery Video'
style={[
style,
animatedViewStyles,
{
transform: [
Expand All @@ -185,6 +184,7 @@ export const AnimatedGalleryVideo = React.memo(
{ scale: oneEighth },
],
},
style,
]}
>
{isVideoPackageAvailable() && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export const ImageGalleryFooterWithContext = <
pointerEvents={'box-none'}
style={styles.wrapper}
>
<ReanimatedSafeAreaView style={[container, footerStyle, { backgroundColor: white }]}>
<ReanimatedSafeAreaView style={[container, { backgroundColor: white }, footerStyle]}>
{photo.type === 'video' ? (
videoControlElement ? (
videoControlElement({ duration, onPlayPause, paused, progress, videoRef })
Expand All @@ -195,7 +195,7 @@ export const ImageGalleryFooterWithContext = <
/>
)
) : null}
<View style={[styles.innerContainer, innerContainer, { backgroundColor: white }]}>
<View style={[styles.innerContainer, { backgroundColor: white }, innerContainer]}>
{leftElement ? (
leftElement({ openGridView, photo, share, shareMenuOpen })
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const ImageGalleryVideoControl = React.memo(
return (
<View style={[styles.videoContainer, videoContainer]}>
<TouchableOpacity accessibilityLabel='Play Pause Button' onPress={handlePlayPause}>
<View style={[styles.roundedView, roundedView, { backgroundColor: static_white }]}>
<View style={[styles.roundedView, { backgroundColor: static_white }, roundedView]}>
{paused ? (
<Play accessibilityLabel='Play Icon' fill={static_black} height={32} width={32} />
) : (
Expand All @@ -83,7 +83,7 @@ export const ImageGalleryVideoControl = React.memo(
</TouchableOpacity>
<Text
accessibilityLabel='Progress Duration'
style={[styles.durationTextStyle, durationTextStyle, { color: black }]}
style={[styles.durationTextStyle, { color: black }, durationTextStyle]}
>
{progressDuration ? progressDuration : '00:00'}
</Text>
Expand All @@ -97,7 +97,7 @@ export const ImageGalleryVideoControl = React.memo(
/>
<Text
accessibilityLabel='Video Duration'
style={[styles.durationTextStyle, durationTextStyle, { color: black }]}
style={[styles.durationTextStyle, { color: black }, durationTextStyle]}
>
{videoDuration ? videoDuration : '00:00'}
</Text>
Expand Down

0 comments on commit 3926168

Please sign in to comment.