Skip to content

Commit 7e5ec2e

Browse files
committed
Merge branch 'master' of github.com:wix/react-native-ui-lib
2 parents 94efd3f + 5cd12d0 commit 7e5ec2e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/components/carousel/index.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,10 @@ export default class Carousel extends BaseComponent {
264264

265265
if (pageControlPosition) {
266266
const pagesCount = presenter.getChildrenLength(this.props);
267-
const containerStyle = pageControlPosition === PAGE_CONTROL_POSITIONS.UNDER ?
268-
{marginVertical: 16} : {position: 'absolute', bottom: 16, alignSelf: 'center'};
267+
const containerStyle =
268+
pageControlPosition === PAGE_CONTROL_POSITIONS.UNDER
269+
? this.styles.pageControlContainerStyleUnder
270+
: this.styles.pageControlContainerStyle;
269271

270272
return (
271273
<PageControl
@@ -340,6 +342,14 @@ function createStyles() {
340342
position: 'absolute',
341343
top: 12,
342344
right: 12
345+
},
346+
pageControlContainerStyle: {
347+
position: 'absolute',
348+
bottom: 16,
349+
alignSelf: 'center'
350+
},
351+
pageControlContainerStyleUnder: {
352+
marginVertical: 16
343353
}
344354
});
345355
}

0 commit comments

Comments
 (0)