feat(#46): Move change view button to sidebar

This commit is contained in:
Josh Creek
2024-07-17 22:15:43 +01:00
parent bfde0c49f5
commit a4269259f9
2 changed files with 11 additions and 3 deletions
@@ -14,11 +14,20 @@
export let toggleOrigins = () => {};
export let toggleShiny = () => {};
export let getData = () => {};
export let toggleViewAsBoxes = () => {};
</script>
<aside
class="menu bg-gray-800 text-white min-h-full w-64 p-4 lg:fixed xs:top-0 lg:left-0 h-full lg:h-5/6"
>
<h2 class="text-2xl font-semibold mb-4">Views</h2>
<ul>
<li class="mb-2">
<button class="block p-2 hover:bg-gray-700 rounded" on:click={toggleViewAsBoxes}>
{viewAsBoxes ? 'Switch to List View' : 'Switch to Box View'}
</button>
</li>
</ul>
<h2 class="text-2xl font-semibold mb-4">Filters</h2>
<ul>
<li class="mb-2">
+2 -3
View File
@@ -245,9 +245,7 @@
>
{drawerOpen ? 'Close Filters' : 'Open Filters'}
</label>
<button class="btn btn-primary" on:click={toggleViewAsBoxes}>
{viewAsBoxes ? 'Switch to List View' : 'Switch to Box View'}
</button>
{#if viewAsBoxes}
<PokedexViewBoxes
bind:showShiny
@@ -292,6 +290,7 @@
{toggleForms}
{toggleOrigins}
{toggleShiny}
{toggleViewAsBoxes}
/>
</div>
</div>