Skip to content

Commit

Permalink
Ellipsize pill component contents when too large
Browse files Browse the repository at this point in the history
  • Loading branch information
FadhlanR committed Apr 3, 2024
1 parent 7a43d36 commit 785b8bd
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/host/app/components/card-pill.gts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ export default class CardPill extends Component<CardPillSignature> {
</RealmInfoProvider>
</:icon>
<:default>
<this.component @displayContainer={{false}} />
<div class='card-content'>
<this.component @displayContainer={{false}} />
</div>
{{#if @removeCard}}
<IconButton
class='remove-button'
Expand Down Expand Up @@ -86,6 +88,15 @@ export default class CardPill extends Component<CardPillSignature> {
.is-autoattached {
border-style: dashed;
}
.card-content {
display: flex;
max-width: 100px;
}
:deep(.atom-format) {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
</template>
}

0 comments on commit 785b8bd

Please sign in to comment.