Skip to content

Commit

Permalink
feat(#89): add slots to group filter (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher authored Sep 16, 2024
1 parent 889e75d commit 5eeb213
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 deletions src/components/GroupFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<div class="row">
<div class="col-xxs-12">
<div class="row row--no-wrap ct-group-filter__row">
<!-- Title-->
<div class="col col--no-grow">
<div class="ct-align-middle">
<CTLabel class="ct-group-filter__title" :theme="theme">
Expand All @@ -15,6 +16,7 @@
</div>
</div>

<!-- Filters -->
<div class="col">
<div class="ct-align-middle">
<CTItemList
Expand All @@ -25,28 +27,33 @@
type="horizontal"
>
<template #default="{ item }">
<CTPopover :trigger="item.name" group="group-filters">
<slot :name="`filter-${item.id}`">
<!-- @TODO - default filter? -->
</slot>
</CTPopover>
<slot :name="`filter-wrapper-${item.id}`">
<CTPopover :trigger="item.name" group="group-filters">
<slot :name="`filter-${item.id}`">
<!-- @TODO - default filter? -->
</slot>
</CTPopover>
</slot>
</template>
</CTItemList>
</div>
</div>

<!-- Apply button -->
<div class="col col--no-grow">
<div class="ct-align-middle">
<CTButton
@click.native="$emit('apply')"
class="ct-group-filter__submit"
icon="approve"
icon-position="before"
icon-size="small"
size="small"
text="Apply"
type="secondary"
/>
<slot name="apply">
<CTButton
@click.native="$emit('apply')"
class="ct-group-filter__submit"
icon="approve"
icon-position="before"
icon-size="small"
size="small"
text="Apply"
type="secondary"
/>
</slot>
</div>
</div>
</div>
Expand Down

0 comments on commit 5eeb213

Please sign in to comment.