svelte-french-toast icon indicating copy to clipboard operation
svelte-french-toast copied to clipboard

Toast offset should update when toast updates

Open BlueGreenMagick opened this issue 1 year ago ā€¢ 2 comments

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 avatar Aug 17 '23 12:08 BlueGreenMagick

image

BlueGreenMagick avatar Aug 17 '23 13:08 BlueGreenMagick

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.

kbrgl avatar Aug 18 '23 01:08 kbrgl