Skip to content

Commit 4d6e209

Browse files
committed
fix(NcActionButton): wrap items under single wrapper
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
1 parent ebf25e0 commit 4d6e209

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

src/components/NcActionButton/NcActionButton.vue

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -333,27 +333,22 @@ 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">
339-
{{ name }}
340-
</strong>
341-
<br>
336+
<span class="action-button__longtext-wrapper">
337+
<template v-if="name">
338+
<strong class="action-button__name">
339+
{{ name }}
340+
</strong>
341+
<br>
342+
</template>
342343
<!-- white space is shown on longtext, so we can't
343344
put {{ text }} on a new line for code readability -->
344-
<span class="action-button__longtext" v-text="text" />
345+
<span v-if="isLongText"
346+
class="action-button__longtext"
347+
v-text="text" />
348+
<!-- default text display -->
349+
<span v-else class="action-button__text">{{ text }}</span>
345350
</span>
346351

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-
357352
<!-- right(in LTR) or left(in RTL) arrow icon when there is a sub-menu -->
358353
<ChevronRightIcon v-if="isMenu && !isRtl" :size="20" class="action-button__menu-icon" />
359354
<ChevronLeftIcon v-else-if="isMenu && isRtl" :size="20" class="action-button__menu-icon" />

0 commit comments

Comments
 (0)