apvarun/toastify-js

"offset" option does not appear to be used in init

liester opened this issue · 2 comments

The docs show offset as a property that can be used to more precisely position the toast notification. Looking at toastify -> init function: https://github.com/apvarun/toastify-js/blob/master/src/toastify.js#L30

Expected behavior:
When offset is provided as part of the options object, it is used to determine the positioning of the toast notification.

Current behavior:
offset option does not appear to be used in the toast construction.

Hey @liester, I think you missed L61 where it's used.

Here is an example of how offset works: https://codesandbox.io/s/focused-engelbart-wtgk3

Well that's embarrassing. You are correct. In my head setting the offset to 0 on x and y would have placed the toast directly on the edge of the screen. It was a misunderstanding on my part.
Thank you for the quick response.