Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 2508 | Rev 2529 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
2482 stevensc 1
import React, { useState } from 'react'
2527 stevensc 2
import { Link, useRouteMatch } from 'react-router-dom'
2482 stevensc 3
import { Collapse, List, ListItemButton, ListItemText } from '@mui/material'
4
import { ExpandLess, ExpandMore } from '@mui/icons-material'
5
 
6
import Widget from '@app/components/UI/Widget'
7
 
8
export default function HabitsMenu() {
2527 stevensc 9
  const { url } = useRouteMatch()
2482 stevensc 10
  const [open, setOpen] = useState(true)
11
 
12
  const handleClick = () => setOpen(!open)
13
 
14
  return (
15
    <Widget>
16
      <List>
17
        <ListItemButton onClick={handleClick}>
18
          <ListItemText primary='Propósito' />
19
          {open ? <ExpandLess /> : <ExpandMore />}
20
        </ListItemButton>
21
 
22
        <Collapse in={open} timeout='auto' unmountOnExit>
23
          <List disablePadding>
2527 stevensc 24
            <ListItemButton
25
              sx={{ pl: 4 }}
26
              LinkComponent={Link}
27
              to={`${url}/paradigms`}
28
            >
2482 stevensc 29
              <ListItemText primary='Paradigmas' />
30
            </ListItemButton>
2527 stevensc 31
            <ListItemButton
32
              sx={{ pl: 4 }}
33
              LinkComponent={Link}
34
              to={`${url}/values`}
35
            >
2482 stevensc 36
              <ListItemText primary='Valores' />
37
            </ListItemButton>
2527 stevensc 38
            <ListItemButton
39
              sx={{ pl: 4 }}
40
              LinkComponent={Link}
41
              to={`${url}/purposes`}
42
            >
2482 stevensc 43
              <ListItemText primary='Propósito' />
44
            </ListItemButton>
45
          </List>
46
        </Collapse>
47
 
2527 stevensc 48
        <ListItemButton LinkComponent={Link} to={`${url}/goals`}>
2482 stevensc 49
          <ListItemText primary='Metas' />
50
        </ListItemButton>
2527 stevensc 51
 
52
        <ListItemButton LinkComponent={Link} to={url}>
53
          <ListItemText primary='Metas' />
54
        </ListItemButton>
2482 stevensc 55
      </List>
56
    </Widget>
57
  )
58
}