mirror of
https://github.com/Redocly/redoc.git
synced 2025-01-31 18:14:07 +03:00
fix: add ellipsis for menu items with long words
This commit is contained in:
parent
335deb983e
commit
3421be2ea3
|
@ -26,7 +26,7 @@ export class MenuItem extends React.Component<MenuItemProps> {
|
||||||
<OperationMenuItemContent item={item as OperationModel} />
|
<OperationMenuItemContent item={item as OperationModel} />
|
||||||
) : (
|
) : (
|
||||||
<MenuItemLabel depth={item.depth} active={item.active}>
|
<MenuItemLabel depth={item.depth} active={item.active}>
|
||||||
<MenuItemTitle>{item.name}</MenuItemTitle>
|
<MenuItemTitle title={item.name}>{item.name}</MenuItemTitle>
|
||||||
{(item.depth > 0 &&
|
{(item.depth > 0 &&
|
||||||
item.items.length > 0 && (
|
item.items.length > 0 && (
|
||||||
<ShelfIcon float={'right'} direction={item.active ? 'down' : 'right'} />
|
<ShelfIcon float={'right'} direction={item.active ? 'down' : 'right'} />
|
||||||
|
|
|
@ -136,4 +136,6 @@ export const MenuItemTitle = withProps<{ width?: string }>(styled.span).attrs({
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
width: ${props => (props.width ? props.width : 'auto')};
|
width: ${props => (props.width ? props.width : 'auto')};
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
`;
|
`;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user