Proyectos de Subversion LeadersLinked - SPA

Rev

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

import React from 'react';
import { Avatar, Box, Rating, Typography } from '@mui/material';

import { parse } from '@utils';

import { Card, CardContent } from '@shared/components';

export function CapsuleDetails({
  capsule: { name, description, image, total_rating },
  readOnly = false
}) {
  const totalRating = Number(total_rating);

  return (
    <Card>
      <CardContent>
        <Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5 }}>
          <Avatar sx={{ width: 60, height: 60 }} src={image} />

          <Box>
            <Typography variant='h2'>{name}</Typography>
            <Typography>{parse(description)}</Typography>
            <Rating readOnly={readOnly} defaultValue={totalRating} sx={{ mt: 0.5 }} />
          </Box>
        </Box>
      </CardContent>
    </Card>
  );
}