Application Android et IOS pour l'amicale des élèves
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SidebarItem.js 805B

12345678910111213141516171819202122232425262728
  1. import * as React from 'react';
  2. import {withTheme} from 'react-native-paper';
  3. import {DrawerItem} from "@react-navigation/drawer";
  4. import {MaterialCommunityIcons} from "@expo/vector-icons";
  5. function SidebarItem(props) {
  6. const {colors} = props.theme;
  7. return (
  8. <DrawerItem
  9. label={props.title}
  10. focused={false}
  11. onPress={props.onPress}
  12. icon={({color, size}) =>
  13. <MaterialCommunityIcons color={color} size={size} name={props.icon}/>}
  14. style={{
  15. marginLeft: 0,
  16. marginRight: 0,
  17. padding: 0,
  18. borderRadius: 0,
  19. }}
  20. labelStyle={{
  21. color: colors.text,
  22. }}
  23. />
  24. );
  25. }
  26. export default withTheme(SidebarItem);