Add tooltip when hover teachers names
This commit is contained in:
parent
bf87ed2f8c
commit
b7b796c07c
2 changed files with 17 additions and 18 deletions
|
@ -7,6 +7,7 @@ import {
|
||||||
Avatar,
|
Avatar,
|
||||||
Stack,
|
Stack,
|
||||||
AvatarGroup,
|
AvatarGroup,
|
||||||
|
Tooltip,
|
||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
|
|
||||||
function ClassCard({ abbreviation, title, color, teachers, layoutType }) {
|
function ClassCard({ abbreviation, title, color, teachers, layoutType }) {
|
||||||
|
@ -54,6 +55,7 @@ function ClassCard({ abbreviation, title, color, teachers, layoutType }) {
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</AvatarGroup>
|
</AvatarGroup>
|
||||||
|
<Tooltip title={teachers.map(t => t.name).join(', ')}>
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
|
@ -67,6 +69,7 @@ function ClassCard({ abbreviation, title, color, teachers, layoutType }) {
|
||||||
>
|
>
|
||||||
{teachers.map(t => t.name).join(', ')}
|
{teachers.map(t => t.name).join(', ')}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
</Tooltip>
|
||||||
</Stack>
|
</Stack>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</CardActionArea>
|
</CardActionArea>
|
||||||
|
|
|
@ -34,10 +34,6 @@ const getClassrooms = userId =>
|
||||||
name: 'Alexandre Couto Cardoso',
|
name: 'Alexandre Couto Cardoso',
|
||||||
avatar: '/assets/alex.jpg',
|
avatar: '/assets/alex.jpg',
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// name: 'Alexandre Couto Cardoso',
|
|
||||||
// avatar: '/assets/alex.jpg',
|
|
||||||
// },
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue