Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 2169 Rev 2170
Línea 1... Línea 1...
1
import React, { useState } from 'react'
1
import React, { useState } from 'react'
2
import { Backdrop, Box, Button } from '@mui/material'
2
import { Backdrop, Box, styled } from '@mui/material'
3
import { renderContent } from '@app/pages/posts/PostViewPage'
3
import { renderContent } from '@app/pages/posts/PostViewPage'
Línea -... Línea 4...
-
 
4
 
-
 
5
import Button from '../UI/buttons/Buttons'
-
 
6
 
-
 
7
const StyledButton = styled(Button)`
-
 
8
  width: auto;
-
 
9
`
4
 
10
 
5
const PostFile = ({ file, type }) => {
11
const PostFile = ({ file, type }) => {
Línea 6... Línea 12...
6
  const [open, setOpen] = useState(false)
12
  const [open, setOpen] = useState(false)
7
 
13
 
Línea 8... Línea 14...
8
  const handleOpen = () => setOpen(true)
14
  const handleOpen = () => setOpen(true)
9
  const handleClose = () => setOpen(false)
15
  const handleClose = () => setOpen(false)
10
 
16
 
11
  return (
17
  return (
12
    <>
18
    <>
13
      <Button onClick={handleOpen}>Ver archivo adjunto</Button>
19
      <StyledButton onClick={handleOpen}>Ver archivo adjunto</StyledButton>
14
      <Backdrop
20
      <Backdrop
15
        sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}
21
        sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}
Línea 20... Línea 26...
20
          sx={{
26
          sx={{
21
            top: '50%',
27
            top: '50%',
22
            left: '50%',
28
            left: '50%',
23
            transform: 'translate(-50%, -50%)',
29
            transform: 'translate(-50%, -50%)',
24
            maxWidth: { xs: '80vw', md: '800px' },
30
            maxWidth: { xs: '80vw', md: '800px' },
25
            height: 'fit-content'
31
            height: 'fit-content',
-
 
32
            position: 'absolute',
-
 
33
            '& img, & video': {
-
 
34
              maxWidth: '100%',
-
 
35
              height: 'auto'
-
 
36
            }
26
          }}
37
          }}
27
        >
38
        >
28
          {renderContent({ file, type })}
39
          {renderContent({ file, type })}
29
        </Box>
40
        </Box>
30
      </Backdrop>
41
      </Backdrop>