upd: caraousel

Deskripsi:
-fix caraousel project pada home page
- fix carousel divisi pada home page
- fix caraousel task divisi pada divisi page
- fix caraousel dokumen divisi pada divisi page

No Issues
This commit is contained in:
amel
2025-03-10 11:20:24 +08:00
parent 5c8d621a5e
commit 6e543b3562
11 changed files with 34 additions and 22 deletions

View File

@@ -47,7 +47,7 @@ export default function EditBanner() {
<Pressable onPress={pickImageAsync} style={[Styles.wrapPaper, Styles.contentItemCenter]}> <Pressable onPress={pickImageAsync} style={[Styles.wrapPaper, Styles.contentItemCenter]}>
<View style={{ justifyContent: 'center', alignItems: 'center' }}> <View style={{ justifyContent: 'center', alignItems: 'center' }}>
<Entypo name="image" size={50} color={'#aeaeae'} /> <Entypo name="image" size={50} color={'#aeaeae'} />
<Text style={[Styles.textInformation]}>Mohon unggah gambar dalam resolusi 1535 x 450 piksel untuk memastikan</Text> <Text style={[Styles.textInformation, Styles.mt05]}>Mohon unggah gambar dalam resolusi 1535 x 450 piksel untuk memastikan</Text>
</View> </View>
</Pressable> </Pressable>
) )

View File

@@ -47,7 +47,7 @@ export default function CreateBanner() {
<Pressable onPress={pickImageAsync} style={[Styles.wrapPaper, Styles.contentItemCenter]}> <Pressable onPress={pickImageAsync} style={[Styles.wrapPaper, Styles.contentItemCenter]}>
<View style={{justifyContent:'center', alignItems:'center'}}> <View style={{justifyContent:'center', alignItems:'center'}}>
<Entypo name="image" size={50} color={'#aeaeae'} /> <Entypo name="image" size={50} color={'#aeaeae'} />
<Text style={[Styles.textInformation]}>Mohon unggah gambar dalam resolusi 1535 x 450 piksel untuk memastikan</Text> <Text style={[Styles.textInformation, Styles.mt05]}>Mohon unggah gambar dalam resolusi 1535 x 450 piksel untuk memastikan</Text>
</View> </View>
</Pressable> </Pressable>
) )

View File

@@ -46,7 +46,7 @@ export default function Index() {
)} )}
/> />
<ButtonForm text="SUBMIT" onPress={() => { router.push("/home") }} /> <ButtonForm text="SUBMIT" onPress={() => { router.push("/home") }} />
<Text style={[Styles.textInformation, Styles.cDefault, { textAlign: 'center' }]}> <Text style={[Styles.textInformation, Styles.mt05, Styles.cDefault, { textAlign: 'center' }]}>
Tidak Menerima kode verifikasi? Kirim Ulang Tidak Menerima kode verifikasi? Kirim Ulang
</Text> </Text>
</SafeAreaView> </SafeAreaView>

View File

@@ -41,7 +41,7 @@ export default function BorderBottomItem({ title, subtitle, icon, desc, onPress,
} }
</View> </View>
{ {
rightTopInfo && <Text style={[Styles.textInformation]}>{rightTopInfo}</Text> rightTopInfo && <Text style={[Styles.textInformation, Styles.mt05]}>{rightTopInfo}</Text>
} }
</View> </View>
@@ -59,7 +59,7 @@ export default function BorderBottomItem({ title, subtitle, icon, desc, onPress,
} }
{ {
typeof rightBottomInfo == 'string' ? typeof rightBottomInfo == 'string' ?
<Text style={[Styles.textInformation, Styles.cGray, { textAlign: 'right' }]}>{rightBottomInfo}</Text> <Text style={[Styles.textInformation, Styles.mt05, Styles.cGray, { textAlign: 'right' }]}>{rightBottomInfo}</Text>
: :
rightBottomInfo rightBottomInfo
} }

View File

@@ -16,7 +16,7 @@ export default function FileDivisionDetail() {
<Carousel <Carousel
ref={ref} ref={ref}
width={width} width={width}
height={100} height={115}
data={data} data={data}
loop={true} loop={true}
autoPlay={false} autoPlay={false}
@@ -24,12 +24,22 @@ export default function FileDivisionDetail() {
pagingEnabled={true} pagingEnabled={true}
snapEnabled={true} snapEnabled={true}
vertical={false} vertical={false}
style={{
width: width,
}}
mode="parallax"
modeConfig={{
parallaxScrollingScale: 1,
parallaxScrollingOffset: 280,
}}
renderItem={({ index }) => ( renderItem={({ index }) => (
<View style={{ width: '30%' }}> <View style={{ margin: 'auto', width:'28%' }}>
<View style={[Styles.wrapPaper, { alignItems: 'center' }]}> <View style={{alignItems:'center'}}>
<Feather name="file-text" size={50} color="black" style={Styles.mr05} /> <View style={[Styles.wrapPaper, { alignItems: 'center' }]}>
<Feather name="file-text" size={50} color="black" style={Styles.mr05} />
</View>
</View> </View>
<Text style={[Styles.textMediumNormal, { textAlign: 'center' }]}>File_Pertama.png</Text> <Text style={[Styles.textMediumNormal, { textAlign: 'center' }]} numberOfLines={1}>File_Pertama.png Amalia Dwi</Text>
</View> </View>
)} )}

View File

@@ -14,7 +14,8 @@ export default function TaskDivisionDetail() {
<Text style={[Styles.textDefaultSemiBold, Styles.mb05]}>Tugas Hari Ini</Text> <Text style={[Styles.textDefaultSemiBold, Styles.mb05]}>Tugas Hari Ini</Text>
<Carousel <Carousel
ref={ref} ref={ref}
width={width} style={{ width: "100%" }}
width={width * 0.8}
height={100} height={100}
data={data} data={data}
loop={true} loop={true}
@@ -24,7 +25,7 @@ export default function TaskDivisionDetail() {
snapEnabled={true} snapEnabled={true}
vertical={false} vertical={false}
renderItem={({ index }) => ( renderItem={({ index }) => (
<View style={[Styles.wrapPaper, { width: '80%'}]}> <View style={[Styles.wrapPaper, { width: '95%'}]}>
<Text style={[Styles.textDefaultSemiBold]}>Rancangan Laporan - Laporan 1</Text> <Text style={[Styles.textDefaultSemiBold]}>Rancangan Laporan - Laporan 1</Text>
<View style={[Styles.rowItemsCenter, Styles.mt10]}> <View style={[Styles.rowItemsCenter, Styles.mt10]}>
<Feather name="clock" size={18} color="grey" style={Styles.mr05} /> <Feather name="clock" size={18} color="grey" style={Styles.mr05} />

View File

@@ -15,7 +15,8 @@ export default function DivisionHome() {
<Text style={[Styles.textDefaultSemiBold, Styles.mv10]}>Divisi Teraktif</Text> <Text style={[Styles.textDefaultSemiBold, Styles.mv10]}>Divisi Teraktif</Text>
<Carousel <Carousel
ref={ref} ref={ref}
width={width} style={{ width: "100%" }}
width={width * 0.8}
height={235} height={235}
data={data} data={data}
loop={true} loop={true}

View File

@@ -16,7 +16,8 @@ export default function ProjectHome() {
<Text style={[Styles.textDefaultSemiBold, Styles.mv10]}>Kegiatan Terupdate</Text> <Text style={[Styles.textDefaultSemiBold, Styles.mv10]}>Kegiatan Terupdate</Text>
<Carousel <Carousel
ref={ref} ref={ref}
width={width} style={{ width: "100%" }}
width={width * 0.8}
height={235} height={235}
data={data} data={data}
loop={true} loop={true}

View File

@@ -41,8 +41,8 @@ export function InputForm({ label, placeholder, onChange, info, error, errorText
style={{ width: width && lebar * width / 100}} style={{ width: width && lebar * width / 100}}
/> />
</View> </View>
{error && (<Text style={[Styles.textInformation, Styles.cError]}>{errorText}</Text>)} {error && (<Text style={[Styles.textInformation, Styles.cError, Styles.mt05]}>{errorText}</Text>)}
{info != undefined && (<Text style={[Styles.textInformation, Styles.cGray]}>{info}</Text>)} {info != undefined && (<Text style={[Styles.textInformation, Styles.cGray, Styles.mt05]}>{info}</Text>)}
</View> </View>
) )
} }
@@ -65,8 +65,8 @@ export function InputForm({ label, placeholder, onChange, info, error, errorText
style={[Styles.inputRoundForm, error && { borderColor: "red" }, round && Styles.round30, { backgroundColor: bg && bg == 'white' ? 'white' : 'transparent' }]} style={[Styles.inputRoundForm, error && { borderColor: "red" }, round && Styles.round30, { backgroundColor: bg && bg == 'white' ? 'white' : 'transparent' }]}
onChangeText={onChange} onChangeText={onChange}
/> />
{error && (<Text style={[Styles.textInformation, Styles.cError]}>{errorText}</Text>)} {error && (<Text style={[Styles.textInformation, Styles.cError, Styles.mt05]}>{errorText}</Text>)}
{info != undefined && (<Text style={[Styles.textInformation, , Styles.cGray]}>{info}</Text>)} {info != undefined && (<Text style={[Styles.textInformation, Styles.mt05 , Styles.cGray]}>{info}</Text>)}
</View> </View>
) )
} }

View File

@@ -39,8 +39,8 @@ export default function SelectForm({ label, value, placeholder, onPress, info, e
} }
</View> </View>
</Pressable> </Pressable>
{error && (<Text style={[Styles.textInformation, Styles.cError]}>{errorText}</Text>)} {error && (<Text style={[Styles.textInformation, Styles.mt05, Styles.cError]}>{errorText}</Text>)}
{info != undefined && (<Text style={[Styles.textInformation, , Styles.cGray]}>{info}</Text>)} {info != undefined && (<Text style={[Styles.textInformation, Styles.mt05 , Styles.cGray]}>{info}</Text>)}
</View> </View>
) )
} }

View File

@@ -46,7 +46,6 @@ const Styles = StyleSheet.create({
textInformation: { textInformation: {
fontSize: 12, fontSize: 12,
fontWeight: 'light', fontWeight: 'light',
marginTop: 5,
}, },
cError: { cError: {
color: '#DB1514' color: '#DB1514'
@@ -223,7 +222,7 @@ const Styles = StyleSheet.create({
marginBottom:15 marginBottom:15
}, },
wrapGridCaraousel: { wrapGridCaraousel: {
width: '80%', width: '95%',
height: 200, height: 200,
shadowColor: '#171717', shadowColor: '#171717',
shadowOffset: { width: -2, height: 4 }, shadowOffset: { width: -2, height: 4 },