I am building an app using Phoenix 1.7.0-rc.0 and LiveView 0.18.3. I am trying to learn more about LiveView through the implementation of some the components that come baked into the framework like the modal. For the life of me I cannot figure out how part of it is working. See the heex template code below:
<.modal
:if={@live_action in [:new, :edit]}
id="workspace-modal"
show
on_cancel={JS.navigate(~p"/workspaces")}
>
<.live_component
module={PMWeb.WorkspaceLive.FormComponent}
id={@workspace.id || :new}
title={@page_title}
action={@live_action}
workspace={@workspace}
navigate={~p"/workspaces"}
/>
</.modal>
Where does show
come from? I mean clearly it is an attr on the modal component but I don’t know where the value is set. Can anyone explain?