application-amicale/components/CustomSideMenu.js

27 lines
636 B
JavaScript
Raw Normal View History

// @flow
import * as React from 'react';
import SideMenu from "react-native-side-menu";
import SideBar from "./Sidebar";
type Props = {
navigation: Object,
children: React.Node,
isOpen: boolean,
onChange: Function
}
export default class CustomSideMenu extends React.Component<Props> {
render() {
console.log(this.props.isOpen);
return (
<SideMenu menu={<SideBar navigation={this.props.navigation}/>}
isOpen={this.props.isOpen}
onChange={this.props.onChange}>
{this.props.children}
</SideMenu>
);
}
}