2020-03-07 11:49:32 +01:00
|
|
|
import * as React from 'react';
|
2020-03-29 14:46:44 +02:00
|
|
|
import {withTheme} from 'react-native-paper';
|
2020-03-07 11:49:32 +01:00
|
|
|
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 {*}
|
|
|
|
*/
|
2020-03-07 11:49:32 +01:00
|
|
|
function SidebarDivider(props) {
|
2020-03-29 14:46:44 +02:00
|
|
|
const {colors} = props.theme;
|
2020-03-07 11:49:32 +01:00
|
|
|
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);
|