Skip to content

Commit

Permalink
fixup! chore(NcNoteCard): use custom icon slot
Browse files Browse the repository at this point in the history
  • Loading branch information
DorraJaouad committed Feb 8, 2024
1 parent d97d610 commit a73efd5
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions src/components/NewMessage/NewMessageAbsenceInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export default {
data() {
return {
collapsed: true,
isTextMoreThanOneLine: false,
}
},

Expand All @@ -94,13 +95,25 @@ export default {
},
},

watch: {
userAbsenceMessage() {
this.$nextTick(() => {
this.setIsTextMoreThanOneLine()
})
},
},

mounted() {
this.setIsTextMoreThanOneLine()
},

methods: {
toggleCollapsed() {
this.collapsed = !this.collapsed
},

isTextMoreThanOneLine() {
return this.$refs.absenceMessage?.scrollHeight > this.$refs.absenceMessage?.clientHeight
setIsTextMoreThanOneLine() {
this.isTextMoreThanOneLine = this.$refs.absenceMessage?.scrollHeight > this.$refs.absenceMessage?.clientHeight
},
},
}
Expand All @@ -114,13 +127,6 @@ export default {
padding: 10px 10px 10px 6px;
border-radius: var(--border-radius-large);

&__content {
display: flex;
align-items: center;
gap: 4px;
width: 100%;
}

&__caption {
font-weight: bold;
margin: 5px 44px 5px 0;
Expand All @@ -140,8 +146,8 @@ export default {
}

&__button {
position: absolute;
top: 5px;
position: absolute !important;
top: 4px;
right: 20px;

& .icon {
Expand Down

0 comments on commit a73efd5

Please sign in to comment.