Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3505 | Rev 3618 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3505 Rev 3541
Línea 13... Línea 13...
13
export function MenuContent({ icon, children }) {
13
export function MenuContent({ icon, children }) {
14
  const { anchorEl, open, openMenu, closeMenu } = useContext(MenuContext);
14
  const { anchorEl, open, openMenu, closeMenu } = useContext(MenuContext);
Línea 15... Línea 15...
15
 
15
 
16
  return (
16
  return (
-
 
17
    <>
-
 
18
      <OptionsButton
-
 
19
        onClick={(event) => {
-
 
20
          event.stopPropagation();
-
 
21
          openMenu(event.currentTarget);
-
 
22
        }}
17
    <>
23
      >
-
 
24
        {icon ? icon : <MoreVert />}
18
      <OptionsButton onClick={openMenu}>{icon ? icon : <MoreVert />}</OptionsButton>
25
      </OptionsButton>
19
      <MuiMenu
26
      <MuiMenu
20
        anchorEl={anchorEl}
27
        anchorEl={anchorEl}
21
        open={open}
28
        open={open}
-
 
29
        onClose={(event) => {
-
 
30
          event.stopPropagation();
-
 
31
          closeMenu();
22
        onClose={closeMenu}
32
        }}
23
        anchorOrigin={{
33
        anchorOrigin={{
24
          vertical: 'bottom',
34
          vertical: 'bottom',
25
          horizontal: 'left'
35
          horizontal: 'left'
26
        }}
36
        }}
Línea 36... Línea 46...
36
}
46
}
Línea 37... Línea 47...
37
 
47
 
38
export function MenuItem({ onClick, children }) {
48
export function MenuItem({ onClick, children }) {
Línea -... Línea 49...
-
 
49
  const { handleClick } = useContext(MenuContext);
-
 
50
 
-
 
51
  return (
-
 
52
    <MuiMenuItem
39
  const { handleClick } = useContext(MenuContext);
53
      onClick={(event) => {
-
 
54
        event.stopPropagation();
-
 
55
        handleClick(onClick);
-
 
56
      }}
-
 
57
    >
-
 
58
      {children}
40
 
59
    </MuiMenuItem>