tambahan
This commit is contained in:
32
components/home/carouselHome.tsx
Normal file
32
components/home/carouselHome.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
import Styles from "@/constants/Styles";
|
||||
import React from "react";
|
||||
import { Dimensions, Text, View } from "react-native";
|
||||
import { useSharedValue } from "react-native-reanimated";
|
||||
import Carousel, { ICarouselInstance } from "react-native-reanimated-carousel";
|
||||
|
||||
export default function CaraouselHome() {
|
||||
const ref = React.useRef<ICarouselInstance>(null);
|
||||
const width = Dimensions.get("window").width;
|
||||
const data = [...new Array(6).keys()];
|
||||
const progress = useSharedValue<number>(0);
|
||||
|
||||
return (
|
||||
<View style={{ marginVertical: 20 }}>
|
||||
<Carousel
|
||||
ref={ref}
|
||||
width={width}
|
||||
height={width / 2.5}
|
||||
data={data}
|
||||
loop={true}
|
||||
autoPlay={true}
|
||||
autoPlayInterval={5000}
|
||||
onProgressChange={progress}
|
||||
renderItem={({ index }) => (
|
||||
<View style={Styles.caraoselContent} >
|
||||
<Text style={{ textAlign: "center", color: "white", fontWeight: 'bold' }}>BANNER DARMASABA</Text>
|
||||
</View>
|
||||
)}
|
||||
/>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
3
components/home/fiturHome.tsx
Normal file
3
components/home/fiturHome.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function FiturHome(){
|
||||
|
||||
}
|
||||
18
components/home/headerRightHome.tsx
Normal file
18
components/home/headerRightHome.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import { View } from "react-native"
|
||||
import { router } from "expo-router"
|
||||
import Feather from '@expo/vector-icons/Feather';
|
||||
import { ButtonHeader } from "../buttonHeader";
|
||||
|
||||
export function HeaderRightHome() {
|
||||
return (
|
||||
<View style={{
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-between',
|
||||
width: 140,
|
||||
}}>
|
||||
<ButtonHeader item={<Feather name="search" size={20} color="white" />} onPress={() => { router.push('/') }} />
|
||||
<ButtonHeader item={<Feather name="bell" size={20} color="white" />} onPress={() => { router.push('/') }} />
|
||||
<ButtonHeader item={<Feather name="user" size={20} color="white" />} onPress={() => { router.push('/') }} />
|
||||
</View>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user