-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
41407d0
commit cabce8c
Showing
3 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<script setup lang="ts"> | ||
import { state } from "../../store"; | ||
import type { SiteEvaluationList } from "../../client"; | ||
const props = defineProps<{ | ||
evaluations: SiteEvaluationList; | ||
}>(); | ||
const emit = defineEmits<{ | ||
(e: "filter", by: string, value: string): void; | ||
}>(); | ||
</script> | ||
|
||
<template> | ||
<div class="dropdown"> | ||
<label tabindex="0" class="btn m-1">Performer</label> | ||
<ul | ||
tabindex="0" | ||
class="dropdown-content menu rounded-box w-52 bg-base-100 p-2 shadow" | ||
> | ||
<li | ||
v-for="(performer, i) in props.evaluations.performers" | ||
:key="`performer-filter-${i}`" | ||
> | ||
<a | ||
:class="state.filters.performer === performer ? 'bg-info' : ''" | ||
@click="emit('filter', 'performer', performer)" | ||
>{{ performer }}</a | ||
> | ||
</li> | ||
</ul> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import PerformerFilter from "./PerformerFilter.vue"; | ||
|
||
export const filters = [PerformerFilter]; |