Dependencies updated & Stack navigator issues fixed

This commit is contained in:
symphony-dev
2022-04-06 14:21:17 +05:00
parent 3f62b1867a
commit 92eaadbb19
4 changed files with 143 additions and 94 deletions

View File

@@ -1,26 +1,23 @@
import React from "react";
import {
ScrollView,
StyleSheet,
Image
} from "react-native";
import { Block, Text, theme } from "galio-framework";
import { Image, ScrollView, StyleSheet } from "react-native";
import { DrawerItem as DrawerCustomItem } from "../components";
import Images from "../constants/Images";
import { DrawerItem as DrawerCustomItem } from '../components';
import React from "react";
function CustomDrawerContent({ drawerPosition, navigation, profile, focused, state, ...rest }) {
const screens = [
"Home",
"Profile",
"Account",
"Elements",
"Articles",
];
function CustomDrawerContent({
drawerPosition,
navigation,
profile,
focused,
state,
...rest
}) {
const screens = ["Home", "Profile", "Account", "Elements", "Articles"];
return (
<Block
style={styles.container}
forceInset={{ top: 'always', horizontal: 'never' }}
forceInset={{ top: "always", horizontal: "never" }}
>
<Block flex={0.06} style={styles.header}>
<Image styles={styles.logo} source={Images.Logo} />
@@ -28,27 +25,37 @@ function CustomDrawerContent({ drawerPosition, navigation, profile, focused, sta
<Block flex style={{ paddingLeft: 8, paddingRight: 14 }}>
<ScrollView style={{ flex: 1 }} showsVerticalScrollIndicator={false}>
{screens.map((item, index) => {
return (
<DrawerCustomItem
title={item}
key={index}
navigation={navigation}
focused={state.index === index ? true : false}
/>
);
})}
<Block flex style={{ marginTop: 24, marginVertical: 8, paddingHorizontal: 8 }}>
<Block style={{ borderColor: "rgba(0,0,0,0.2)", width: '100%', borderWidth: StyleSheet.hairlineWidth }}/>
<Text color="#8898AA" style={{ marginTop: 16, marginLeft: 8 }}>DOCUMENTATION</Text>
</Block>
<DrawerCustomItem title="Getting Started" navigation={navigation} />
return (
<DrawerCustomItem
title={item}
key={index}
navigation={navigation}
focused={state.index === index ? true : false}
/>
);
})}
<Block
flex
style={{ marginTop: 24, marginVertical: 8, paddingHorizontal: 8 }}
>
<Block
style={{
borderColor: "rgba(0,0,0,0.2)",
width: "100%",
borderWidth: StyleSheet.hairlineWidth,
}}
/>
<Text color="#8898AA" style={{ marginTop: 16, marginLeft: 8 }}>
DOCUMENTATION
</Text>
</Block>
<DrawerCustomItem title="Getting Started" navigation={navigation} />
</ScrollView>
</Block>
</Block>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
@@ -57,8 +64,8 @@ const styles = StyleSheet.create({
paddingHorizontal: 28,
paddingBottom: theme.SIZES.BASE,
paddingTop: theme.SIZES.BASE * 3,
justifyContent: 'center'
}
justifyContent: "center",
},
});
export default CustomDrawerContent;