Skip to content

Commit

Permalink
Merge pull request #1912 from nextcloud/fix-appnavigationitem-counter-2
Browse files Browse the repository at this point in the history
Fix counter margin
  • Loading branch information
marcoambrosini authored May 6, 2021
2 parents a9c9acd + 64f88ef commit c3fe45b
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/components/AppNavigationItem/AppNavigationItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ Just set the `pinned` prop.

<!-- Counter and Actions -->
<div v-if="hasUtils" class="app-navigation-entry__utils">
<slot name="counter" />
<div v-if="$slots.counter"
class="app-navigation-entry__counter-wrapper">
<slot name="counter" />
</div>
<Actions menu-align="right"
:placement="menuPlacement"
:open="menuOpen"
Expand Down Expand Up @@ -447,6 +450,7 @@ export default {
box-sizing: border-box;
width: 100%;
min-height: $clickable-area;
padding-right: 4px;
// When .active class is applied, change color background of link and utils. The
// !important prevents the focus state to override the active state.
Expand Down Expand Up @@ -581,11 +585,15 @@ export default {
display: flex;
align-items: center;
flex: 0 1 auto;
// visually balance the menu so it's not
// stuck to the scrollbar
.action-item {
margin-right: 2px;
}
}
/* counter */
.app-navigation-entry__counter-wrapper {
// Add slightly more space to the right of the counter
margin-right: 2px;
display: flex;
align-items: center;
flex: 0 1 auto;
}
// STATES
Expand Down

0 comments on commit c3fe45b

Please sign in to comment.