mirror of
https://github.com/fergalmoran/argon-react-native.git
synced 2025-12-25 10:47:31 +00:00
69 lines
1.5 KiB
JavaScript
69 lines
1.5 KiB
JavaScript
import React from "react";
|
|
import { DrawerItems } from "react-navigation";
|
|
import {
|
|
ScrollView,
|
|
StyleSheet,
|
|
Dimensions,
|
|
Image
|
|
} from "react-native";
|
|
import { Block, theme } from "galio-framework";
|
|
|
|
import Images from "../constants/Images";
|
|
|
|
const { width } = Dimensions.get("screen");
|
|
|
|
const Drawer = props => (
|
|
<Block style={styles.container} forceInset={{ top: 'always', horizontal: 'never' }}>
|
|
<Block flex={0.05} style={styles.header}>
|
|
<Image styles={styles.logo} source={Images.Logo} />
|
|
</Block>
|
|
<Block flex>
|
|
<ScrollView showsVerticalScrollIndicator={false} style={{ flex: 1 }}>
|
|
<DrawerItems {...props} />
|
|
</ScrollView>
|
|
</Block>
|
|
</Block>
|
|
);
|
|
|
|
const Menu = {
|
|
contentComponent: props => <Drawer {...props} />,
|
|
drawerBackgroundColor: "white",
|
|
drawerWidth: width * 0.8,
|
|
contentOptions: {
|
|
activeTintColor: "white",
|
|
inactiveTintColor: "#000",
|
|
activeBackgroundColor: "transparent",
|
|
itemStyle: {
|
|
width: width * 0.75,
|
|
backgroundColor: "transparent"
|
|
},
|
|
labelStyle: {
|
|
fontSize: 18,
|
|
marginLeft: 12,
|
|
fontWeight: "normal"
|
|
},
|
|
itemsContainerStyle: {
|
|
paddingVertical: 16,
|
|
paddingHorizonal: 12,
|
|
justifyContent: "center",
|
|
alignContent: "center",
|
|
alignItems: "center",
|
|
overflow: "hidden"
|
|
}
|
|
}
|
|
};
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
flex: 1,
|
|
},
|
|
header: {
|
|
paddingHorizontal: 28,
|
|
paddingBottom: theme.SIZES.BASE,
|
|
paddingTop: theme.SIZES.BASE * 3,
|
|
justifyContent: 'center'
|
|
}
|
|
});
|
|
|
|
export default Menu;
|