Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev Autor Línea Nro. Línea
3556 stevensc 1
import React from 'react';
2
import { Link } from 'react-router-dom';
3
import { Box, Button, styled, Typography } from '@mui/material';
3694 stevensc 4
import NavigateNext from '@mui/icons-material/NavigateNext';
3556 stevensc 5
 
6
import { Card, CardContent } from '@shared/components';
7
import { parse } from '@shared/utils';
8
 
9
const CardImage = styled('img')(({ theme }) => ({
10
  borderRadius: theme.shape.borderRadius,
11
  maxWidth: 100,
12
  aspectRatio: '1/1.5',
13
  objectFit: 'cover'
14
}));
15
 
16
export function LastCapsuleProgressCard({
17
  capsule: { name, description, image, completed, uuid }
18
}) {
19
  return (
20
    <Card>
21
      <CardContent>
22
        <Box
23
          sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 0.5 }}
24
        >
25
          <Box>
26
            <Typography variant='caption'>{completed ? 'Completa' : 'En curso'}</Typography>
27
            <Typography variant='h2'>{name}</Typography>
28
            <Typography>{parse(description)}</Typography>
29
 
30
            <Button LinkComponent={Link} to={`/microlearning/capsules/${uuid}/slides`}>
31
              Ver cápsula
32
              <NavigateNext fontSize='small' />
33
            </Button>
34
          </Box>
35
 
36
          <CardImage src={image} alt={name} />
37
        </Box>
38
      </CardContent>
39
    </Card>
40
  );
41
}