For the UI that I’m working on I’ve found myself having to customize the live view :container
option. Currently I’ve just passed the option to each live route that needs this modification as such:
live("/buildings/:id/dashboard", Dashboard.DashboardLive, :building,
container: {:div, class: "flex-1"}
)
I found myself having to apply this change to a few other routes and I’m wondering if there is a cleaner way to do this so I’m not repeatedly passing the same container options to each route. Is there a common solution to change the default container on a group of live views?
Using Phoenix v 1.5.7 and LiveView v0.15.0 (Though we are planning to upgrade to the latest versions after our next release so if there is a better solution available in a later version that is an option as well)