mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-14 15:37:53 +00:00
feat: add plugin funnel button to reveal search and sort options
This commit is contained in:
parent
54a5aa649e
commit
a077a76049
1 changed files with 3 additions and 1 deletions
|
|
@ -156,6 +156,7 @@ new class extends Component {
|
||||||
|
|
||||||
<div class="py-12" x-data="{
|
<div class="py-12" x-data="{
|
||||||
searchTerm: '',
|
searchTerm: '',
|
||||||
|
showFilters: false,
|
||||||
filterPlugins(plugins) {
|
filterPlugins(plugins) {
|
||||||
if (this.searchTerm.length <= 1) return plugins;
|
if (this.searchTerm.length <= 1) return plugins;
|
||||||
const search = this.searchTerm.toLowerCase();
|
const search = this.searchTerm.toLowerCase();
|
||||||
|
|
@ -166,6 +167,7 @@ new class extends Component {
|
||||||
<div class="flex justify-between items-center mb-6">
|
<div class="flex justify-between items-center mb-6">
|
||||||
<h2 class="text-2xl font-semibold dark:text-gray-100">Plugins & Recipes</h2>
|
<h2 class="text-2xl font-semibold dark:text-gray-100">Plugins & Recipes</h2>
|
||||||
|
|
||||||
|
<flux:button icon="funnel" variant="primary" @click="showFilters = !showFilters"></flux:button>
|
||||||
<flux:button.group>
|
<flux:button.group>
|
||||||
<flux:modal.trigger name="add-plugin">
|
<flux:modal.trigger name="add-plugin">
|
||||||
<flux:button icon="plus" variant="primary">Add Recipe</flux:button>
|
<flux:button icon="plus" variant="primary">Add Recipe</flux:button>
|
||||||
|
|
@ -191,7 +193,7 @@ new class extends Component {
|
||||||
</flux:button.group>
|
</flux:button.group>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-6 flex flex-col sm:flex-row gap-4">
|
<div x-show="showFilters" class="mb-6 flex flex-col sm:flex-row gap-4" style="display: none;">
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
<flux:input
|
<flux:input
|
||||||
x-model="searchTerm"
|
x-model="searchTerm"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue