Вот мой статический код:
class App extends Component {
render() {
return (
<MyApp />
)
}
}
const CustomDrawerContentComponent = (props) => (
<View style={{position:'relative', height:'100%'}}>
<View style={styles.drawerHeader}>
<ImageBackground style={styles.back} source={require('./src/Header/banner.jpg')}>
<View style={{flex:1, justifyContent:'center', alignItems:'center'}}>
<Image
style={styles.drawerImage}
source={require('./src/shirsho.png')} />
</View>
</ImageBackground>
</View>
<View>
{/* <DrawerItems {...props} /> */}
<DrawerItems {...props}
activeTintColor='#000'
activeBackgroundColor='#e3e3e3'
inactiveTintColor='rgba(0, 0, 0, .87)'
inactiveBackgroundColor='transparent'
itemsContainerStyle= {{ marginTop: 0,}}
itemStyle={{ borderBottomWidth: 2, borderBottomColor: '#eee',}}
labelStyle={{fontSize: 16,color: '#000'}}/>
</View>
<View style={{width:100,height:50, position:'absolute', bottom:0,right:30}}>
<Image
style={{width:100, marginLeft: 10,}}
source={require('./src/bdtask.png')} />
</View>
</View>
);
const MyApp = DrawerNavigator({
'হোম' : {
screen : Homepage,
},
'জাতীয়' :{
screen : NationalTab,
},
'খেলা' :{
screen : PlayTab,
},
'প্রশাসন' :{
screen : AdminTab,
},
'অর্থনীতি' :{
screen : EconomicsTab,
},
'বিনোদন' :{
screen : EntertainmentTab,
},
'শিক্ষা' :{
screen : EducationTab,
}
},{
initialRouteName: 'হোম',
drawerPosition: 'left',
contentComponent: CustomDrawerContentComponent,
drawerOpenRoute: 'DrawerOpen',
drawerCloseRoute: 'DrawerClose',
drawerToggleRoute: 'DrawerToggle'
})
export default App
Кроме того, я хочу передать значение в качестве реквизита с этим элементом ящика.