kbrgl / svelte-french-toast

šŸžšŸ„‚ Buttery smooth toast notifications for Svelte
https://svelte-french-toast.vercel.app/
MIT License
809 stars 28 forks source link

Toast offset should update when toast updates #51

Open BlueGreenMagick opened 11 months ago

BlueGreenMagick commented 11 months ago

When a toast is modified, its height can change, which should update the toast offsets for all other toasts.

For example, in the below code the updated toast is stacked on top of another toast below.

toast.promise(promise, {
loading: 'Saving...',
success: `Settings saved! This message extends across multiple lines.`,
error: `Could not save. This message extends across multiple lines.`
});
BlueGreenMagick commented 11 months ago

image

kbrgl commented 11 months ago

Holy cow that's ugly. Thanks for reporting this issue, will investigate. Iā€™m looking into moving to a flexbox based approach where I don't do manual offset calculations so that this issue doesn't come up.