Add types to components and remove unused components

This commit is contained in:
Ben Parsons 2023-07-03 20:46:03 +10:00
commit ce9fa22a30
7 changed files with 270 additions and 423 deletions

View file

@ -1,11 +1,24 @@
<script>
export let name;
export let link;
<script lang="ts">
export let name: string;
export let link: string;
export let img = "https://placehold.it/600x300";
export let size = { width: 600, height: 300 };
export let description;
export let description: string;
</script>
<div class="card">
<div class="back">
<a href={link}>
<img src={img} alt={name} width={size.width} height={size.height} />
</a>
</div>
<div class="description">
<h2>{name}</h2>
<p>{description}</p>
</div>
</div>
<br />
<style>
.card {
display: flex;
@ -28,16 +41,3 @@
}
}
</style>
<div class="card">
<div class="back">
<a href="{link}">
<img src={img} alt={name} width={size.width} height={size.height}>
</a>
</div>
<div class="description">
<h2>{name}</h2>
<p>{description}</p>
</div>
</div>
<br>