What is the best approach to do pop-ups with turbo frames?
I’ve currently created a turbo container with the ID ‘popup’. When you click a button, that request returns a response containing a turbo container rendering inside the popup. When you click button 2, the contents from request 2 is rendered inside the popup.
However, what is the best approach to hide and show the popup? Ideally, when you click the button, the popup will animate in (using css) and the container loads. When loading, a loading indicator should be shown.
What is the easiest way to do this? Simply create a 2nd click handler on the button that will trigger the popup to show? Or are there better approaches to doing this?