From 6ded578f298fbd1f0930b4950dd9712a93a8b8f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domantas=20Sl=C4=97nys?= Date: Wed, 5 Nov 2025 14:41:38 +0200 Subject: [PATCH 1/5] allow passing counter style to adjust margins --- src/components/carousel/index.tsx | 4 ++-- src/components/carousel/types.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/carousel/index.tsx b/src/components/carousel/index.tsx index 561fc102c2..66c26cade7 100644 --- a/src/components/carousel/index.tsx +++ b/src/components/carousel/index.tsx @@ -459,13 +459,13 @@ class Carousel extends Component { } renderCounter() { - const {pageWidth, showCounter, counterTextStyle} = this.props; + const {pageWidth, showCounter, counterStyle, counterTextStyle} = this.props; const {currentStandingPage} = this.state; const pagesCount = presenter.getChildrenLength(this.props); if (showCounter && !pageWidth) { return ( - + {currentStandingPage + 1}/{pagesCount} diff --git a/src/components/carousel/types.ts b/src/components/carousel/types.ts index d813ca86a3..d851a8bbf8 100644 --- a/src/components/carousel/types.ts +++ b/src/components/carousel/types.ts @@ -66,6 +66,10 @@ export interface CarouselProps extends ScrollViewProps { * whether to show a page counter (will not work with 'pageWidth' prop) */ showCounter?: boolean; + /** + * the counter's style + */ + counterStyle?: StyleProp; /** * the counter's text style */ From f5a224d3ae0b8534d604801385e88b6e0ae986e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domantas=20Sl=C4=97nys?= <55202884+alwaysintune@users.noreply.github.com> Date: Mon, 10 Nov 2025 10:29:32 +0200 Subject: [PATCH 2/5] Update src/components/carousel/index.tsx Co-authored-by: Adi Mordo --- src/components/carousel/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/carousel/index.tsx b/src/components/carousel/index.tsx index 66c26cade7..80fc99a406 100644 --- a/src/components/carousel/index.tsx +++ b/src/components/carousel/index.tsx @@ -459,7 +459,7 @@ class Carousel extends Component { } renderCounter() { - const {pageWidth, showCounter, counterStyle, counterTextStyle} = this.props; + const {pageWidth, showCounter, counterContainerStyle, counterTextStyle} = this.props; const {currentStandingPage} = this.state; const pagesCount = presenter.getChildrenLength(this.props); From ac76326f451b66a7d62030f5a5f2d122ebac9074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domantas=20Sl=C4=97nys?= <55202884+alwaysintune@users.noreply.github.com> Date: Mon, 10 Nov 2025 10:29:39 +0200 Subject: [PATCH 3/5] Update src/components/carousel/index.tsx Co-authored-by: Adi Mordo --- src/components/carousel/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/carousel/index.tsx b/src/components/carousel/index.tsx index 80fc99a406..5cbad942e6 100644 --- a/src/components/carousel/index.tsx +++ b/src/components/carousel/index.tsx @@ -465,7 +465,7 @@ class Carousel extends Component { if (showCounter && !pageWidth) { return ( - + {currentStandingPage + 1}/{pagesCount} From 1532fddd64afd1bf97d6b46995e12fb4ba70d906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domantas=20Sl=C4=97nys?= <55202884+alwaysintune@users.noreply.github.com> Date: Mon, 10 Nov 2025 10:29:48 +0200 Subject: [PATCH 4/5] Update src/components/carousel/types.ts Co-authored-by: Adi Mordo --- src/components/carousel/types.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/carousel/types.ts b/src/components/carousel/types.ts index d851a8bbf8..e4b8621b27 100644 --- a/src/components/carousel/types.ts +++ b/src/components/carousel/types.ts @@ -69,7 +69,10 @@ export interface CarouselProps extends ScrollViewProps { /** * the counter's style */ - counterStyle?: StyleProp; + /** + * the counter's container style + */ + counterContainerStyle?: StyleProp; /** * the counter's text style */ From c0c1102dae40d2b9dd55588aaef60ed0a609cb8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domantas=20Sl=C4=97nys?= Date: Mon, 10 Nov 2025 15:23:47 +0200 Subject: [PATCH 5/5] remove duplicate comment --- src/components/carousel/types.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/components/carousel/types.ts b/src/components/carousel/types.ts index e4b8621b27..451252e872 100644 --- a/src/components/carousel/types.ts +++ b/src/components/carousel/types.ts @@ -66,9 +66,6 @@ export interface CarouselProps extends ScrollViewProps { * whether to show a page counter (will not work with 'pageWidth' prop) */ showCounter?: boolean; - /** - * the counter's style - */ /** * the counter's container style */