Skip to content

Commit

Permalink
Revert listItem bold title
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Rittershofer <jotoeri@users.noreply.github.com>
  • Loading branch information
jotoeri committed Aug 30, 2022
1 parent fac811c commit 83a5041
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/NcAppNavigationItem/NcAppNavigationItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ export default {
min-height: $clickable-area;
transition: background-color var(--animation-quick) ease-in-out;
transition: background-color 200ms ease-in-out;
border-radius: var(--border-radius-pill);
border-radius: 16px;
&-wrapper {
position: relative;
Expand Down
62 changes: 58 additions & 4 deletions src/components/NcListItem/NcListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,49 @@
</NcListItem>
</ul>
```

### NcListItem not bold or fully bold
```
<ul style="width: 350px;">
<NcListItem
:title="'Title of the element'"
:bold="true"
:counter-number="1"
:compact="true" >
<template #icon>
<div class="icon-edit" />
</template>
<template #subtitle>
This one is with subtitle
</template>
<template #actions>
<NcActionButton>
Button one
</NcActionButton>
<NcActionButton>
Button two
</NcActionButton>
</template>
</NcListItem>
<NcListItem
:title="'Title of the element'"
:counter-number="2"
:compact="true" >
<template #icon>
<div class="icon-edit" />
</template>
</NcListItem>
<NcListItem
:title="'Title of the element'"
:counter-number="3"
:boldTitle="false"
:compact="true" >
<template #icon>
<div class="icon-edit" />
</template>
</NcListItem>
</ul>
```
</docs>

<template>
Expand Down Expand Up @@ -215,7 +258,8 @@
:class="{ 'list-item-content__main--oneline': oneLine }">

<!-- First line, title and details -->
<div class="line-one">
<div class="line-one"
:class="{'line-one--bold': bold || boldTitle}">
<span class="line-one__title">
{{ title }}
</span>
Expand Down Expand Up @@ -341,7 +385,15 @@ export default {
},
/**
* Make subtitle bold
* Make only title bold
*/
boldTitle: {
type: Boolean,
default: true,
},
/**
* Make title and subtitle bold
*/
bold: {
type: Boolean,
Expand Down Expand Up @@ -570,7 +622,7 @@ export default {
flex: 0 0 auto;
justify-content: flex-start;
padding: 8px;
border-radius: var(--border-radius-pill);
border-radius: 16px;
margin: 2px 0;
width: 100%;
cursor: pointer;
Expand Down Expand Up @@ -637,14 +689,16 @@ export default {
white-space: nowrap;
margin: 0 auto 0 0;
overflow: hidden;
&--bold {
font-weight: bold;
}
&__title {
overflow: hidden;
flex-grow: 1;
cursor: pointer;
text-overflow: ellipsis;
color: var(--color-main-text);
font-weight: bold;
}
&__details {
Expand Down

0 comments on commit 83a5041

Please sign in to comment.