Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 4298 | Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
4296 stevensc 1
import React, { useState } from 'react'
2
import { Avatar } from '@mui/material'
3
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'
4
import ExpandLessIcon from '@mui/icons-material/ExpandLess'
5
import StatItem from './StatItem'
6
import './Sidebar.css'
7
import RecentItem from './RecentItem'
8
 
9
const Sidebar = () => {
10
  const [display, setDisplay] = useState(false)
11
 
12
  return (
13
    <div className='sidebar'>
14
 
15
      <div className='sidebar__top'>
16
        <img src='./static/profile_2.jpg' alt='Profile cover' />
17
        <Avatar />
18
        <h2>Stivens Carrasquel</h2>
19
        <h4>loremipsun@gmail.com</h4>
20
      </div>
21
 
22
      <div className={`sidebar__options ${display && 'show'}`}>
23
        <div className='sidebar__stats'>
24
          <StatItem title='Who viewed you' number={20} />
25
          <StatItem title='Who viewed you' number={20} />
26
        </div>
27
 
28
        <RecentItem />
29
      </div>
30
 
31
      <footer className='sideabar__footer'>
32
        <button
33
          onClick={() => setDisplay(!display)}
34
          type='button'
35
        >
36
          <span>
37
            {display ? 'Show less' : 'Show more'}
38
          </span>
39
          {display ? <ExpandLessIcon /> : <ExpandMoreIcon />}
40
        </button>
41
      </footer>
42
 
43
    </div>
44
  )
45
}
46
 
47
export default Sidebar