1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-23 14:59:36 +02:00

Add capital to countries

This commit is contained in:
Sean Morley 2024-09-11 16:08:10 -04:00
parent 4dc11db21d
commit 6ac3f0541f
6 changed files with 39 additions and 5 deletions

View file

@ -5,6 +5,8 @@
import { createEventDispatcher } from 'svelte';
const dispatch = createEventDispatcher();
import MapMarkerStar from '~icons/mdi/map-marker-star';
export let country: Country;
async function nav() {
@ -21,7 +23,12 @@
</figure>
<div class="card-body">
<h2 class="card-title overflow-ellipsis">{country.name}</h2>
<div class="badge badge-primary">{country.subregion}</div>
{#if country.subregion}
<div class="badge badge-primary">{country.subregion}</div>
{/if}
{#if country.capital}
<div class="badge badge-secondary"><MapMarkerStar class="-ml-1 mr-1" />{country.capital}</div>
{/if}
<div class="card-actions justify-end">
<!-- <button class="btn btn-info" on:click={moreInfo}>More Info</button> -->
<button class="btn btn-primary" on:click={nav}>Open</button>