Skip to content

Commit f37333a

Browse files
authored
Carousel - Flip page control in rtl. (#3781)
* fix(carousel): update PageControl containerStyle for RTL support * fix(carousel): enhance PageControl containerStyle for RTL and iOS
1 parent c2725c9 commit f37333a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/carousel/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ class Carousel extends Component<CarouselProps, CarouselState> {
447447
<PageControl
448448
size={size}
449449
spacing={spacing}
450-
containerStyle={containerStyle}
450+
containerStyle={[containerStyle, Constants.isRTL && Constants.isIOS && styles.flip]}
451451
inactiveColor={inactiveColor}
452452
color={color}
453453
{...others}
@@ -550,6 +550,9 @@ const styles = StyleSheet.create({
550550
top: 12,
551551
right: 12
552552
},
553+
flip: {
554+
transform: [{scaleX: -1}]
555+
},
553556
pageControlContainerStyle: {
554557
position: 'absolute',
555558
bottom: 16,

0 commit comments

Comments
 (0)