I added useFocusReturn utility to have the ability to automatically return focus on the last focused element when the user close the Modal component. Also could be useful for the Drawer component in the future.
It is a hook from Mantine rewritten in a more svelte way.
Also, I added documentation for this utility but have not been able to test it since I couldn't run docs locally on a windows machine. Could you please make sure that I didn't mess up something in the docs =)
Hi.
I added
useFocusReturn
utility to have the ability to automatically return focus on the last focused element when the user close the Modal component. Also could be useful for the Drawer component in the future.It is a hook from Mantine rewritten in a more svelte way.
Also, I added documentation for this utility but have not been able to test it since I couldn't run docs locally on a windows machine. Could you please make sure that I didn't mess up something in the docs =)