12345678910111213141516171819202122232425262728 |
- import * as React from 'react';
- import {withTheme} from 'react-native-paper';
- import {DrawerItem} from "@react-navigation/drawer";
- import {MaterialCommunityIcons} from "@expo/vector-icons";
-
- function SidebarItem(props) {
- const {colors} = props.theme;
- return (
- <DrawerItem
- label={props.title}
- focused={false}
- onPress={props.onPress}
- icon={({color, size}) =>
- <MaterialCommunityIcons color={color} size={size} name={props.icon}/>}
- style={{
- marginLeft: 0,
- marginRight: 0,
- padding: 0,
- borderRadius: 0,
- }}
- labelStyle={{
- color: colors.text,
- }}
- />
- );
- }
-
- export default withTheme(SidebarItem);
|