Skip to content

Commit a6370b6

Browse files
committed
text overlaping the resourse sharing
1 parent 79253f6 commit a6370b6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/inputs/RoleEditor/RoleEditor.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT license.
33
import React from 'react';
44
import PropTypes from 'prop-types';
5-
import { Grid2 as Grid, Typography, Avatar } from '@mui/material';
5+
import { Grid2 as Grid, Typography, Avatar, Tooltip } from '@mui/material';
66
import makeStyles from '@mui/styles/makeStyles';
77
import { DefaultAvatar } from '../../misc';
88
import { getIdentifierFromUserEmail } from '../../utils';
@@ -15,6 +15,10 @@ const useStyles = makeStyles((theme) => ({
1515
gap: '15px',
1616
marginLeft: 0,
1717
},
18+
agentName: {
19+
overflow:'hidden',
20+
textOverflow: 'ellipsis'
21+
},
1822
rolesEditor: {
1923
display: 'flex',
2024
alignItems: 'center',
@@ -23,6 +27,7 @@ const useStyles = makeStyles((theme) => ({
2327
nameGroup: {
2428
display: 'flex',
2529
flexDirection: 'column',
30+
maxWidth: '80%'
2631
},
2732
}));
2833
export const RoleEditor = ({
@@ -42,9 +47,11 @@ export const RoleEditor = ({
4247
<Grid className={classes.agentGroup} size={7}>
4348
{avatar}
4449
<div className={classes.nameGroup}>
45-
<Typography data-cy="role-editor-agent-name" variant="body1">
50+
<Tooltip title={agentName} arrow>
51+
<Typography className={classes.agentName} data-cy="role-editor-agent-name" variant="body1">
4652
{agentName}
4753
</Typography>
54+
</Tooltip>
4855
{helperText != null && (
4956
<Typography data-cy="role-editor-helper-text" variant="body2" color="textSecondary">
5057
{helperText[agentAccess]}

0 commit comments

Comments
 (0)