Skip to content

Commit

Permalink
Merge pull request #1930 from nextcloud/fix/1925/action-button-icon
Browse files Browse the repository at this point in the history
Wrap icon span in icon slot for ActionButton
  • Loading branch information
skjnldsv authored May 6, 2021
2 parents c3fe45b + 5f3cb6a commit 73b4d96
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/ActionButton/ActionButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ export default {
:aria-label="ariaLabel"
:class="{ focusable: isFocusable }"
@click="onClick">
<span :class="[isIconUrl ? 'action-button__icon--url' : icon]"
:style="{ backgroundImage: isIconUrl ? `url(${icon})` : null }"
class="action-button__icon">
<!-- @slot Manually provide icon -->
<slot name="icon" />
</span>
<!-- @slot Manually provide icon -->
<slot name="icon">
<span :class="[isIconUrl ? 'action-button__icon--url' : icon]"
:style="{ backgroundImage: isIconUrl ? `url(${icon})` : null }"
class="action-button__icon" />
</slot>

<!-- long text with title -->
<p v-if="title">
Expand Down

0 comments on commit 73b4d96

Please sign in to comment.