application-amicale/components/SidebarDivider.js

30 lines
733 B
JavaScript
Raw Normal View History

import * as React from 'react';
2020-03-29 14:46:44 +02:00
import {withTheme} from 'react-native-paper';
import {DrawerItem} from "@react-navigation/drawer";
2020-03-29 14:46:44 +02:00
/**
* Component used to render a drawer menu item divider
*
* @param props Props to pass to the component
* @return {*}
*/
function SidebarDivider(props) {
2020-03-29 14:46:44 +02:00
const {colors} = props.theme;
return (
<DrawerItem
label={props.title}
focused={false}
onPress={undefined}
style={{
marginLeft: 0,
marginRight: 0,
padding: 0,
borderRadius: 0,
backgroundColor: colors.dividerBackground
}}
/>
);
}
export default withTheme(SidebarDivider);