Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 2620 Rev 2622
Línea 1... Línea 1...
1
import React, { useState } from 'react'
1
import React, { useState } from 'react'
2
import { NavLink as Link, useRouteMatch } from 'react-router-dom'
2
import { NavLink as Link } from 'react-router-dom'
3
import {
3
import {
4
  Collapse,
4
  Collapse,
5
  List,
5
  List,
6
  ListItemButton,
6
  ListItemButton,
7
  ListItemText,
7
  ListItemText,
Línea 21... Línea 21...
21
    }
21
    }
22
  }
22
  }
23
}))
23
}))
Línea 24... Línea 24...
24
 
24
 
25
export default function HabitsMenu() {
-
 
26
  const { url } = useRouteMatch()
25
export default function HabitsMenu() {
Línea 27... Línea 26...
27
  const [open, setOpen] = useState(false)
26
  const [open, setOpen] = useState(false)
Línea 28... Línea 27...
28
 
27
 
Línea 36... Línea 35...
36
            '& .MuiListItemButton-root.active .MuiTypography-body1': {
35
            '& .MuiListItemButton-root.active .MuiTypography-body1': {
37
              fontWeight: '600'
36
              fontWeight: '600'
38
            }
37
            }
39
          }}
38
          }}
40
        >
39
        >
41
          <ListItemButton LinkComponent={Link} to={url} exact>
40
          <ListItemButton LinkComponent={Link} to='' exact>
42
            <ListItemText primary='Habitos' />
41
            <ListItemText primary='Habitos' />
43
          </ListItemButton>
42
          </ListItemButton>
Línea 44... Línea 43...
44
 
43
 
45
          <ListItemButton LinkComponent={Link} to={`${url}/goals`} exact>
44
          <ListItemButton LinkComponent={Link} to='goals' exact>
46
            <ListItemText primary='Metas' />
45
            <ListItemText primary='Metas' />
Línea 47... Línea 46...
47
          </ListItemButton>
46
          </ListItemButton>
48
 
47
 
49
          <ListItemButton onClick={handleClick}>
48
          <ListItemButton onClick={handleClick}>
50
            <ListItemText primary='Propósitos' />
49
            <ListItemText primary='Propósitos' />
Línea 51... Línea 50...
51
            {open ? <ExpandLess /> : <ExpandMore />}
50
            {open ? <ExpandLess /> : <ExpandMore />}
52
          </ListItemButton>
51
          </ListItemButton>
53
 
-
 
54
          <Collapse in={open} timeout='auto' unmountOnExit>
-
 
55
            <List disablePadding>
52
 
56
              <ListItemButton
-
 
57
                sx={{ pl: 4 }}
-
 
58
                LinkComponent={Link}
53
          <Collapse in={open} timeout='auto' unmountOnExit>
59
                to={`${url}/purposes`}
54
            <List disablePadding>
60
              >
55
              <ListItemButton sx={{ pl: 4 }} LinkComponent={Link} to='purposes'>
61
                <ListItemText primary='Propósito' />
56
                <ListItemText primary='Propósito' />
62
              </ListItemButton>
57
              </ListItemButton>
63
              <ListItemButton
58
              <ListItemButton
64
                sx={{ pl: 4 }}
59
                sx={{ pl: 4 }}
65
                LinkComponent={Link}
60
                LinkComponent={Link}
66
                to={`${url}/paradigms`}
61
                to='paradigms'
67
              >
-
 
68
                <ListItemText primary='Paradigmas' />
-
 
69
              </ListItemButton>
62
              >
70
              <ListItemButton
-
 
71
                sx={{ pl: 4 }}
-
 
72
                LinkComponent={Link}
63
                <ListItemText primary='Paradigmas' />
73
                to={`${url}/values`}
64
              </ListItemButton>
74
              >
65
              <ListItemButton sx={{ pl: 4 }} LinkComponent={Link} to='values'>
75
                <ListItemText primary='Valores' />
66
                <ListItemText primary='Valores' />
76
              </ListItemButton>
67
              </ListItemButton>