1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-20 05:19:38 +02:00
AdventureLog/frontend/src/lib/components/CollectionCard.svelte

46 lines
1.3 KiB
Svelte
Raw Normal View History

2024-07-10 13:36:51 -04:00
<script lang="ts">
import { createEventDispatcher } from 'svelte';
2024-07-10 13:49:40 -04:00
import Calendar from '~icons/mdi/calendar';
import MapMarker from '~icons/mdi/map-marker';
import Launch from '~icons/mdi/launch';
import TrashCanOutline from '~icons/mdi/trash-can-outline';
2024-07-10 13:36:51 -04:00
import { goto } from '$app/navigation';
2024-07-15 09:36:07 -04:00
import type { Collection } from '$lib/types';
2024-07-10 13:36:51 -04:00
const dispatch = createEventDispatcher();
// export let type: String;
2024-07-15 09:36:07 -04:00
export let collection: Collection;
2024-07-10 13:36:51 -04:00
// function remove() {
// dispatch("remove", trip.id);
// }
// function edit() {}
// function add() {
// dispatch("add", trip);
// }
// // TODO: Implement markVisited function
// function markVisited() {
// console.log(trip.id);
// dispatch("markVisited", trip);
// }
</script>
<div
class="card min-w-max lg:w-96 md:w-80 sm:w-60 xs:w-40 bg-primary-content shadow-xl overflow-hidden text-base-content"
>
<div class="card-body">
2024-07-15 09:36:07 -04:00
<h2 class="card-title overflow-ellipsis">{collection.name}</h2>
<p>{collection.adventures.length} Adventures</p>
2024-07-10 13:36:51 -04:00
<div class="card-actions justify-end">
2024-07-10 13:49:40 -04:00
<button class="btn btn-secondary"><TrashCanOutline class="w-5 h-5 mr-1" /></button>
2024-07-15 09:36:07 -04:00
<button class="btn btn-primary" on:click={() => goto(`/trip/${collection.id}`)}
2024-07-10 13:49:40 -04:00
><Launch class="w-5 h-5 mr-1" /></button
2024-07-10 13:36:51 -04:00
>
</div>
</div>
</div>