import * as React from 'react'; import { View } from 'react-native-ui-lib'; import Carousel from 'rn-animated-carousel'; import { SBItem } from '../components/SBItem'; import SButton from '../components/SButton'; import { ElementsText } from '../constants'; import { FadeInRight } from 'react-native-reanimated'; function Index() { const [mode, setMode] = React.useState('horizontal-stack'); const [snapDirection, setSnapDirection] = React.useState<'left' | 'right'>( 'left' ); const [pagingEnabled, setPagingEnabled] = React.useState(true); const [snapEnabled, setSnapEnabled] = React.useState(true); const [loop, setLoop] = React.useState(true); const [autoPlay, setAutoPlay] = React.useState(false); const [autoPlayReverse, setAutoPlayReverse] = React.useState(false); const data = React.useRef([...new Array(6).keys()]).current; const viewCount = 5; return ( ({ type: 'positive', viewCount })} renderItem={({ index }) => ( )} /> { setMode('horizontal-stack'); }} > {'horizontal-stack'} { setMode('vertical-stack'); }} > {'vertical-stack'} { setAutoPlay(!autoPlay); }} > {`${ElementsText.AUTOPLAY}:${autoPlay}`} { setAutoPlayReverse(!autoPlayReverse); }} > {`autoPlayReverse:${autoPlayReverse}`} { setLoop(!loop); }} > {`loop:${loop}`} { setSnapDirection( snapDirection === 'left' ? 'right' : 'left' ); }} > {snapDirection} { setPagingEnabled(!pagingEnabled); }} > {`pagingEnabled:${pagingEnabled}`} { setSnapEnabled(!snapEnabled); }} > {`snapEnabled:${snapEnabled}`} ); } export default Index;