Skip to content

Commit

Permalink
fixes #1387
Browse files Browse the repository at this point in the history
  • Loading branch information
thoomasbro committed May 22, 2024
1 parent f92ec79 commit 12798bd
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,15 @@ const LayerItem = styled.li<{ $isSelected: boolean }>`
border-bottom: 1px solid ${p => p.theme.color.lightGray};
`

// using average width of 7px per character to approximate min-width
// more precise calculation would require measuring text width with access to the dom
const GroupName = styled.span`
color: ${p => p.theme.color.gunMetal};
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font: normal normal bold 13px/18px Marianne;
min-width: ${p => (p.title?.length && p.title.length * 7 > 220 ? 200 : 0)}px;
`

const Name = styled.span`
Expand All @@ -89,4 +92,5 @@ const Name = styled.span`
text-overflow: ellipsis;
white-space: nowrap;
font: normal normal normal 13px/18px Marianne;
flex: 1;
`

0 comments on commit 12798bd

Please sign in to comment.