Fluxon (Fluxon v1.0.20)
Summary
Functions
Closes a dialog component (modal, sheet).
Closes a dialog via push event.
Opens a dialog component (modal, sheet).
Opens a dialog via push event.
Functions
Closes a dialog component (modal, sheet).
Parameters
id
- The ID of the dialog element to close.
Example
<.button phx-click={Fluxon.close_dialog("my-modal")}>Close modal</.button>
<.modal id="my-modal"></.modal>
Closes a dialog via push event.
Parameters
socket
- ThePhoenix.LiveView.Socket
struct.id
- The ID of the dialog element to close.
Example
def handle_event("close_dialog", _, socket) do
{:noreply, Fluxon.close_dialog(socket, "my-dialog")}
end
Opens a dialog component (modal, sheet).
Example
<.button phx-click={Fluxon.open_dialog("my-modal")}>Open modal</.button>
<.modal id="my-modal"></.modal>
Opens a dialog via push event.
Parameters
socket
- ThePhoenix.LiveView.Socket
struct.id
- The ID of the dialog element to open.
Example
def handle_event("open_dialog", _, socket) do
{:noreply, Fluxon.open_dialog(socket, "my-dialog")}
end