From 6b05f5847bdbb141fbe62232902bdde2ed00058a Mon Sep 17 00:00:00 2001 From: Renato Date: Sat, 30 Mar 2024 23:53:38 -0600 Subject: [PATCH] Submit function of tooltip and number of caracters --- src/components/ItemCard.jsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/ItemCard.jsx b/src/components/ItemCard.jsx index 59e608c..5966e74 100644 --- a/src/components/ItemCard.jsx +++ b/src/components/ItemCard.jsx @@ -2,11 +2,14 @@ import Card from '@mui/material/Card'; import CardContent from '@mui/material/CardContent'; import CardMedia from '@mui/material/CardMedia'; import Typography from '@mui/material/Typography'; -import { Box, CardActionArea } from '@mui/material'; +import { Box, CardActionArea, Tooltip } from '@mui/material'; export const ItemCard = ({ item, columns, onClick }) => { + + return ( + {item.imageUrl && ( { )} - {item[column.field]} + + {/*item[column.field]*/} + {column.field ==='dpi' ? item[column.field]: '' } + {column.field === 'name' ? (item[column.field].length > 20 ? item[column.field].slice(0, 20) + '...' : item[column.field] ) : ''} ))} + ); };