Skip to content

Commit

Permalink
Use slot in BaseIcon component
Browse files Browse the repository at this point in the history
  • Loading branch information
Esteban Lara committed Jan 6, 2020
1 parent b8a2f1c commit f0a2654
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/components/BaseIcon.vue
Expand Up @@ -3,6 +3,8 @@
<svg class="icon" :width="width" :height="height">
<use v-bind="{ 'xlink:href': '/feather-sprite.svg#' + name }" />
</svg>

<slot></slot>
</div>
</template>

Expand Down
3 changes: 1 addition & 2 deletions src/components/EventCard.vue
Expand Up @@ -6,8 +6,7 @@
<div class="event-card -shadow">
<span class="eyebrow">@{{ event.time }} on {{ event.date }}</span>
<h4 class="title">{{ event.title }}</h4>
<BaseIcon name="users" />
<span>{{ event.attendees.length }} attending</span>
<BaseIcon name="users">{{ event.attendees.length }} attending</BaseIcon>
</div>
</router-link>
</template>
Expand Down

0 comments on commit f0a2654

Please sign in to comment.