Skip to content

Commit 843b7e1

Browse files
release: version packages (beta)
1 parent c595958 commit 843b7e1

File tree

3 files changed

+46
-8
lines changed

3 files changed

+46
-8
lines changed

.changeset/pre.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
"react-native-reanimated-carousel": "4.0.3"
66
},
77
"changesets": [
8-
"honest-baboons-sip"
8+
"blue-news-stare",
9+
"honest-baboons-sip",
10+
"odd-news-carry"
911
]
1012
}

CHANGELOG.md

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
11
# react-native-reanimated-carousel
22

3+
## 5.0.0-beta.1
4+
5+
### Minor Changes
6+
7+
- [#853](https://github.com/dohooo/react-native-reanimated-carousel/pull/853) [`c595958`](https://github.com/dohooo/react-native-reanimated-carousel/commit/c59595896381c36cc395f95b8631aee503cfd927) Thanks [@dohooo](https://github.com/dohooo)! - - add `itemWidth`/`itemHeight` props so horizontal and vertical carousels can define their snapping step explicitly (e.g. to show multiple cards per page)
8+
9+
- default behaviour still falls back to the carousel container size or legacy `width`/`height` props
10+
11+
- [#853](https://github.com/dohooo/react-native-reanimated-carousel/pull/853) [`c595958`](https://github.com/dohooo/react-native-reanimated-carousel/commit/c59595896381c36cc395f95b8631aee503cfd927) Thanks [@dohooo](https://github.com/dohooo)! - ## ✨ Style API refresh
12+
13+
- `style` now controls the outer carousel container (positioning, width/height, margins).
14+
- New `contentContainerStyle` replaces `containerStyle` for styling the scrollable content.
15+
- `width` and `height` props are deprecated; define size via `style` instead.
16+
17+
### Migration Example
18+
19+
```tsx
20+
// Before
21+
<Carousel
22+
width={300}
23+
height={200}
24+
containerStyle={{ paddingHorizontal: 16 }}
25+
/>
26+
27+
// After
28+
<Carousel
29+
style={{ width: 300, height: 200 }}
30+
contentContainerStyle={{ paddingHorizontal: 16 }}
31+
/>
32+
```
33+
34+
- Any layout logic still works; simply move `width`/`height` into `style` and container tweaks into `contentContainerStyle`.
35+
- `contentContainerStyle` runs on the JS thread—avoid adding `opacity` / `transform` there if you rely on built-in animations.
36+
337
## 5.0.0-beta.0
438

539
### Major Changes
@@ -16,24 +50,26 @@
1650
#### Migration Guide
1751

1852
**Before:**
53+
1954
```jsx
2055
<Carousel
2156
width={300}
2257
height={200}
23-
style={{ backgroundColor: 'red' }} // Applied to inner container
58+
style={{ backgroundColor: "red" }} // Applied to inner container
2459
containerStyle={{ margin: 10 }} // Applied to outer container
2560
/>
2661
```
2762

2863
**After:**
64+
2965
```jsx
3066
<Carousel
31-
style={{
32-
width: 300,
33-
height: 200,
34-
margin: 10
67+
style={{
68+
width: 300,
69+
height: 200,
70+
margin: 10,
3571
}} // Applied to outer container
36-
contentContainerStyle={{ backgroundColor: 'red' }} // Applied to inner container
72+
contentContainerStyle={{ backgroundColor: "red" }} // Applied to inner container
3773
/>
3874
```
3975

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-reanimated-carousel",
3-
"version": "5.0.0-beta.0",
3+
"version": "5.0.0-beta.1",
44
"packageManager": "[email protected]",
55
"description": "Simple carousel component.fully implemented using Reanimated 2.Infinitely scrolling, very smooth.",
66
"author": "Doho <[email protected]> (https://github.com/dohooo)",

0 commit comments

Comments
 (0)