Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 1478 Rev 1479
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react'
2
import { Container, styled } from '@mui/material'
2
import { Container, styled } from '@mui/material'
3
import { Add } from '@mui/icons-material'
3
import { Add } from '@mui/icons-material'
Línea 4... Línea 4...
4
 
4
 
5
const Headery = styled(Container)(({ theme }) => ({
5
const Header = styled(Container)(({ theme }) => ({
6
  display: 'flex',
6
  display: 'flex',
7
  alignItems: 'center',
7
  alignItems: 'center',
8
  justifyContent: 'center',
8
  justifyContent: 'space-between',
9
  position: 'relative',
9
  position: 'relative',
10
  h1: {
10
  h1: {
11
    fontSize: '1.1rem',
11
    fontSize: '1.1rem',
12
    fontWeight: 'bold'
12
    fontWeight: '600'
13
  },
13
  },
14
  button: {
14
  button: {
15
    display: 'flex',
15
    display: 'flex',
16
    alignItems: 'center',
16
    alignItems: 'center',
17
    gap: '0.5rem',
17
    gap: '0.5rem',
18
    position: 'relative',
18
    position: 'relative',
19
    fontWeight: '600'
19
    fontWeight: '600'
20
  },
20
  },
21
  [theme.breakpoints.down('md')]: {
21
  [theme.breakpoints.down('up')]: {
22
    justifyContent: 'space-between',
-
 
23
 
22
    justifyContent: 'center',
24
    button: {
23
    button: {
25
      position: 'absolute',
24
      position: 'absolute',
26
      right: 0,
25
      right: 0,
27
      top: '50%',
26
      top: '50%',
Línea 30... Línea 29...
30
  }
29
  }
31
}))
30
}))
Línea 32... Línea 31...
32
 
31
 
33
const TitleSection = ({ onAdd, addLabel = '', title = '', ...rest }) => {
32
const TitleSection = ({ onAdd, addLabel = '', title = '', ...rest }) => {
34
  return (
33
  return (
35
    <Headery {...rest}>
34
    <Header {...rest}>
36
      <h1>{title}</h1>
35
      <h1>{title}</h1>
37
      {onAdd && (
36
      {onAdd && (
38
        <button onClick={onAdd}>
37
        <button onClick={onAdd}>
39
          <Add />
38
          <Add />
40
          {addLabel}
39
          {addLabel}
41
        </button>
40
        </button>
42
      )}
41
      )}
43
    </Headery>
42
    </Header>
44
  )
43
  )
Línea 45... Línea 44...
45
}
44
}