mirror of
https://github.com/jcreek/LivingDexTracker.git
synced 2026-07-12 18:43:45 +00:00
feat(#46): Move change view button to sidebar
This commit is contained in:
@@ -14,11 +14,20 @@
|
|||||||
export let toggleOrigins = () => {};
|
export let toggleOrigins = () => {};
|
||||||
export let toggleShiny = () => {};
|
export let toggleShiny = () => {};
|
||||||
export let getData = () => {};
|
export let getData = () => {};
|
||||||
|
export let toggleViewAsBoxes = () => {};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<aside
|
<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"
|
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>
|
<h2 class="text-2xl font-semibold mb-4">Filters</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li class="mb-2">
|
<li class="mb-2">
|
||||||
|
|||||||
@@ -245,9 +245,7 @@
|
|||||||
>
|
>
|
||||||
{drawerOpen ? 'Close Filters' : 'Open Filters'}
|
{drawerOpen ? 'Close Filters' : 'Open Filters'}
|
||||||
</label>
|
</label>
|
||||||
<button class="btn btn-primary" on:click={toggleViewAsBoxes}>
|
|
||||||
{viewAsBoxes ? 'Switch to List View' : 'Switch to Box View'}
|
|
||||||
</button>
|
|
||||||
{#if viewAsBoxes}
|
{#if viewAsBoxes}
|
||||||
<PokedexViewBoxes
|
<PokedexViewBoxes
|
||||||
bind:showShiny
|
bind:showShiny
|
||||||
@@ -292,6 +290,7 @@
|
|||||||
{toggleForms}
|
{toggleForms}
|
||||||
{toggleOrigins}
|
{toggleOrigins}
|
||||||
{toggleShiny}
|
{toggleShiny}
|
||||||
|
{toggleViewAsBoxes}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user