Skip to content

Commit

Permalink
fix(ui): #1806: add truncation to ValueViewComponent (#1856)
Browse files Browse the repository at this point in the history
* fix(ui): #1806: add truncation to `ValueViewComponent`

* chore: changeset
  • Loading branch information
VanishMax authored Oct 15, 2024
1 parent 9d68f48 commit dad8165
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/thick-parrots-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@penumbra-zone/ui': patch
---

Add ellipsis to `ValueViewComponent`
5 changes: 4 additions & 1 deletion packages/ui/src/ValueViewComponent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const Content = styled.div<{ $context: Context; $priority: 'primary' | 'secondar
const SymbolWrapper = styled.div`
flex-grow: 1;
flex-shrink: 1;
min-width: 50px;
overflow: hidden;
text-overflow: ellipsis;
Expand Down Expand Up @@ -118,7 +119,9 @@ export const ValueViewComponent = <SelectedContext extends Context = 'default'>(
</AssetIconWrapper>

<Content $context={context ?? 'default'} $priority={priority}>
<ValueText density={density}>{formattedAmount} </ValueText>
<SymbolWrapper title={formattedAmount}>
<ValueText density={density}>{formattedAmount} </ValueText>
</SymbolWrapper>
<SymbolWrapper title={symbol}>
<ValueText density={density}>{symbol}</ValueText>
</SymbolWrapper>
Expand Down

0 comments on commit dad8165

Please sign in to comment.