1- import {
2- HeroCarousel ,
3- CarouselContextProvider ,
4- SlideAnimatedView ,
5- } from '@strv/react-native-hero-carousel'
1+ import { HeroCarousel } from '@strv/react-native-hero-carousel'
62import { SafeAreaView , StyleSheet , View , Text , Dimensions } from 'react-native'
73import { Image } from 'expo-image'
84import { LinearGradient } from 'expo-linear-gradient'
@@ -36,17 +32,17 @@ const Slide = ({ image, title, index }: { image: string; title: string; index: n
3632 < Image source = { { uri : image } } style = { styles . image } contentFit = "cover" transition = { 200 } />
3733 < LinearGradient colors = { [ 'transparent' , 'rgba(0,0,0,0.8)' ] } style = { styles . gradient } >
3834 < View style = { styles . text } >
39- < SlideAnimatedView style = { styles . textContainer } { ...animationConfig } >
35+ < HeroCarousel . AnimatedView style = { styles . textContainer } { ...animationConfig } >
4036 < Text style = { styles . title } > { title } </ Text >
41- </ SlideAnimatedView >
42- < SlideAnimatedView
37+ </ HeroCarousel . AnimatedView >
38+ < HeroCarousel . AnimatedView
4339 style = { styles . textContainer }
4440 entering = { FadeIn . duration ( 400 ) . delay ( 200 ) }
4541 >
4642 < Text style = { styles . subtitle } >
4743 Animation: { animationNames [ index % animationNames . length ] }
4844 </ Text >
49- </ SlideAnimatedView >
45+ </ HeroCarousel . AnimatedView >
5046 </ View >
5147 </ LinearGradient >
5248 </ View >
@@ -60,7 +56,7 @@ export default function EnteringAnimationExample() {
6056 } , [ ] )
6157
6258 return (
63- < CarouselContextProvider >
59+ < HeroCarousel . Provider >
6460 < SafeAreaView style = { styles . container } >
6561 < View style = { styles . container } >
6662 < HeroCarousel >
@@ -70,7 +66,7 @@ export default function EnteringAnimationExample() {
7066 </ HeroCarousel >
7167 </ View >
7268 </ SafeAreaView >
73- </ CarouselContextProvider >
69+ </ HeroCarousel . Provider >
7470 )
7571}
7672
0 commit comments