Skip to content

Commit

Permalink
Allow to specify custom action instead of star
Browse files Browse the repository at this point in the history
Signed-off-by: Raimund Schlüßler <[email protected]>
  • Loading branch information
raimund-schluessler committed Aug 18, 2020
1 parent 871d64a commit f1ea31a
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/components/AppSidebar/AppSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,17 @@
}"
class="app-sidebar-header__desc">
<!-- favourite icon -->
<div v-if="canStar" class="app-sidebar-header__star-action">
<a :class="{
'icon-starred': isStarred && !starLoading,
'icon-star': !isStarred && !starLoading,
'icon-loading-small': starLoading
}"
class="app-sidebar-header__star"
@click.prevent="toggleStarred" />
<div v-if="canStar || $slots['tertiary-actions']" class="app-sidebar-header__tertiary-actions">
<slot name="tertiary-actions">
<a v-if="canStar"
:class="{
'icon-starred': isStarred && !starLoading,
'icon-star': !isStarred && !starLoading,
'icon-loading-small': starLoading
}"
class="app-sidebar-header__star"
@click.prevent="toggleStarred" />
</slot>
</div>

<!-- main title -->
Expand Down Expand Up @@ -489,7 +492,7 @@ $top-buttons-spacing: 6px;
box-sizing: content-box;
padding: #{$desc-vertical-padding} 0 #{$desc-vertical-padding} #{$desc-vertical-padding / 2};
.app-sidebar-header__star-action {
.app-sidebar-header__tertiary-actions {
display: flex;
height: $clickable-area;
width: $clickable-area;
Expand Down

0 comments on commit f1ea31a

Please sign in to comment.