Skip to content

Commit

Permalink
chore(docs): update README to improve NotificationList integration an…
Browse files Browse the repository at this point in the history
…d simplify button event handling for better clarity
  • Loading branch information
Michael-Liendo committed Dec 9, 2024
1 parent c54ec8f commit e0821a6
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,15 @@ npm install @whizzes/svelte-notifications
};
</script>

<button on:click="{success}">Append Success</button>

<!-- Notifications provider -->
<NotificationList position="{Position.BottomRight}" let:notification>
<li>
<strong>{notification.title}</strong>
<p>{notification.message}</p>
</li>
<button onclick={success}> Append Success </button>

<NotificationList>
{#snippet children({ notification })}
<li>
<strong>{notification.title}</strong>
<p>{notification.message}</p>
</li>
{/snippet}
</NotificationList>
```

Expand Down

0 comments on commit e0821a6

Please sign in to comment.