boredgame/src/lib/components/preferences/gameCollection.svelte

41 lines
1,016 B
Svelte
Raw Normal View History

<script lang="ts">
2022-08-04 06:32:18 +00:00
import { SaveIcon, TrashIcon } from '@rgossiaux/svelte-heroicons/outline';
import { clearCollection, saveCollection } from '$root/lib/util/manipulateCollection';
</script>
<div>
2022-08-05 06:19:27 +00:00
<div>
<span class="collection-title">Your Collection</span>
</div>
2022-08-04 06:32:18 +00:00
<div class="collection-buttons">
<button type="button" aria-label="Save Collection" on:click={() => saveCollection()}
><SaveIcon width="24" height="24" />Save</button
2022-08-04 06:32:18 +00:00
>
<button type="button" aria-label="Clear saved collection" on:click={() => clearCollection()}
><TrashIcon width="24" height="24" />Clear</button
2022-08-04 06:32:18 +00:00
>
</div>
</div>
<style>
2022-08-04 06:32:18 +00:00
:global(.collection-title) {
padding-bottom: var(--spacing-8);
font-size: var(--font-24);
font-weight: 700;
line-height: 32px;
}
:global(.collection-buttons) {
display: flex;
flex-direction: row;
justify-content: space-between;
2022-08-05 06:19:27 +00:00
gap: 6rem;
}
button {
display: grid;
place-items: center;
gap: 0.25rem;
}
2022-08-04 06:32:18 +00:00
</style>