Skip to content

Commit

Permalink
Allow oneLine ListItem
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Rittershofer <[email protected]>
  • Loading branch information
jotoeri committed Jul 28, 2022
1 parent ac23019 commit bc1645c
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/components/ListItem/ListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@

<!-- Main content -->
<div class="list-item-content">
<div class="list-item-content__main">
<div class="list-item-content__main"
:class="{ 'list-item-content__main--oneline': oneLine }">

<!-- First line, title and details -->
<div class="line-one"
Expand Down Expand Up @@ -360,6 +361,10 @@ export default {
}
},

oneLine() {
return !this.hasSubtitle && !this.showDetails
},

showCounter() {
return !this.displayActionsOnHoverFocus || this.forceDisplayActions
},
Expand Down Expand Up @@ -500,6 +505,7 @@ export default {
&-content__wrapper {
display: flex;
align-items: center;
height: 48px;
}

&-content {
Expand All @@ -510,16 +516,19 @@ export default {

&__main {
flex: 1 1 auto;
flex-direction: column;
width: 0;
margin: auto 0;

&--oneline {
display: flex;
}
}

&__actions {
flex: 0 0 auto;
align-self: center;
justify-content: center;

margin-left: 4px;
}
}

Expand All @@ -533,7 +542,8 @@ export default {
align-items: center;
justify-content: space-between;
white-space: nowrap;
margin: 0 auto;
margin: 0 auto 0 0;
overflow: hidden;
&--bold {
font-weight: bold;
}
Expand Down Expand Up @@ -565,15 +575,14 @@ export default {
&__subtitle {
overflow: hidden;
flex-grow: 1;
padding-right: 4px;
cursor: pointer;
white-space: nowrap;
text-overflow: ellipsis;
color: var(--color-text-lighter);
}

&__counter {
margin: 2px 4px 0 0;
margin: 2px 4px 0 4px;
}
}

Expand Down

0 comments on commit bc1645c

Please sign in to comment.