Skip to content

Commit 758bab5

Browse files
Antreesybackportbot[bot]
authored andcommitted
fix(NcActionButton): wrap items under single wrapper
Signed-off-by: Maksim Sukharev <[email protected]>
1 parent 0391bb8 commit 758bab5

2 files changed

Lines changed: 12 additions & 16 deletions

File tree

‎src/assets/action.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
overflow: hidden;
110110
white-space: nowrap;
111111
max-width: 100%;
112-
display: inline-block;
112+
display: block;
113113
}
114114

115115
&__menu-icon {

‎src/components/NcActionButton/NcActionButton.vue‎

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -333,27 +333,23 @@ export default {
333333
</slot>
334334

335335
<!-- long text with name -->
336-
<span v-if="name"
337-
class="action-button__longtext-wrapper">
338-
<strong class="action-button__name">
336+
<span class="action-button__longtext-wrapper">
337+
<strong v-if="name"
338+
class="action-button__name">
339339
{{ name }}
340340
</strong>
341-
<br>
342341
<!-- white space is shown on longtext, so we can't
343342
put {{ text }} on a new line for code readability -->
344-
<span class="action-button__longtext" v-text="text" />
343+
<span v-if="isLongText"
344+
class="action-button__longtext"
345+
v-text="text" />
346+
<!-- default text display -->
347+
<span v-else
348+
class="action-button__text">
349+
{{ text }}
350+
</span>
345351
</span>
346352

347-
<!-- long text only -->
348-
<!-- white space is shown on longtext, so we can't
349-
put {{ text }} on a new line for code readability -->
350-
<span v-else-if="isLongText"
351-
class="action-button__longtext"
352-
v-text="text" />
353-
354-
<!-- default text display -->
355-
<span v-else class="action-button__text">{{ text }}</span>
356-
357353
<!-- right(in LTR) or left(in RTL) arrow icon when there is a sub-menu -->
358354
<ChevronRightIcon v-if="isMenu && !isRtl" :size="20" class="action-button__menu-icon" />
359355
<ChevronLeftIcon v-else-if="isMenu && isRtl" :size="20" class="action-button__menu-icon" />

0 commit comments

Comments
 (0)