| Planet | Moons | Discovery | Notes |
|---|
| Mercury | 0 | ancient | |
| Venus | 0 | ancient | Very bright |
| Earth | 1 | ancient | Leads with zeros |
| Mars | 2 | 1610 | Phobos/Deimos |
| Jupiter | 95 | 1610 | Gas giant |
Click headers to sort; click again to reverse
svelte<script lang="ts">
import { sortable } from '$lib/attachments'
const planets = [
{ planet: `Mercury`, moons: 0, discovery: `ancient`, notes: `` },
{ planet: `Venus`, moons: 0, discovery: `ancient`, notes: `Very bright` },
{ planet: `Earth`, moons: 1, discovery: `ancient`, notes: `Leads with zeros` },
{ planet: `Mars`, moons: 2, discovery: `1610`, notes: `Phobos/Deimos` },
{ planet: `Jupiter`, moons: 95, discovery: `1610`, notes: `Gas giant` },
]
</script>
<table {@attach sortable()} class="demo-table">
<thead>
<tr>
<th>Planet</th>
<th>Moons</th>
<th>Discovery</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
{#each planets as { planet, moons, discovery, notes }}
<tr>
<td>{planet}</td>
<td>{moons}</td>
<td>{discovery}</td>
<td>{notes}</td>
</tr>
{/each}
</tbody>
<caption style="caption-side: bottom; padding-top: 0.5em">
Click headers to sort; click again to reverse
</caption>
</table>