<script>
import Btn from './Button.svelte'
let users = [{id: 1, loggedIn: false}, {id: 2, loggedIn: false}, {id: 3, loggedIn: true}];
const eventFromApp = (event) => {console.log(event.detail)}
</script>
{#each users as user}
<Btn bind:user={user} on:eventNameToListenFor={eventFromApp}/>
{/each}
<a href="https://stackoverflow.com/questions/72011471/how-to-make-a-button-clickable-in-rows-in-the-table-with-same-functionality-but">Stack Overflow Question (#72011471)</a>
<h2 style="margin:.5em;">Users:</h2>
<pre style="margin-left: 2em;">
{JSON.stringify(users, null, 2)}
</pre>