fix: fix a style issue which workspace switch style broken with long name
This commit is contained in:
parent
e0e044945f
commit
cbdb1c4a07
@ -102,9 +102,8 @@ export const WorkspaceSwitcher: React.FC<WorkspaceSwitcherProps> = React.memo(
|
|||||||
role="combobox"
|
role="combobox"
|
||||||
aria-expanded={open}
|
aria-expanded={open}
|
||||||
className={cn(
|
className={cn(
|
||||||
'w-full justify-between',
|
'flex w-full justify-between',
|
||||||
props.isCollapsed &&
|
props.isCollapsed && 'h-9 w-9 items-center justify-center p-0'
|
||||||
'flex h-9 w-9 items-center justify-center p-0'
|
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<Avatar
|
<Avatar
|
||||||
@ -120,7 +119,12 @@ export const WorkspaceSwitcher: React.FC<WorkspaceSwitcherProps> = React.memo(
|
|||||||
</AvatarFallback>
|
</AvatarFallback>
|
||||||
</Avatar>
|
</Avatar>
|
||||||
|
|
||||||
<span className={cn(props.isCollapsed && 'hidden')}>
|
<span
|
||||||
|
className={cn(
|
||||||
|
'flex-1 overflow-hidden text-ellipsis',
|
||||||
|
props.isCollapsed && 'hidden'
|
||||||
|
)}
|
||||||
|
>
|
||||||
{currentWorkspace.name}
|
{currentWorkspace.name}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@ -156,7 +160,12 @@ export const WorkspaceSwitcher: React.FC<WorkspaceSwitcherProps> = React.memo(
|
|||||||
</AvatarFallback>
|
</AvatarFallback>
|
||||||
</Avatar>
|
</Avatar>
|
||||||
|
|
||||||
|
<span
|
||||||
|
className="overflow-hidden text-ellipsis"
|
||||||
|
title={workspace.name}
|
||||||
|
>
|
||||||
{workspace.name}
|
{workspace.name}
|
||||||
|
</span>
|
||||||
|
|
||||||
<CheckIcon
|
<CheckIcon
|
||||||
className={cn(
|
className={cn(
|
||||||
|
Loading…
Reference in New Issue
Block a user