View Source Phoenix.UI.Components.Modal (Phoenix UI v0.1.9)
Provides modal component.
Link to this section Summary
Link to this section Functions
Hide modal matching selector.
examples
Examples
iex> hide_modal(selector)
%JS{}
iex> hide_modal(js, selector)
%JS{}
@spec modal(Phoenix.LiveView.Socket.assigns()) :: Phoenix.LiveView.Rendered.t()
Renders modal component.
examples
Examples
```
<.modal id="basic_modal">
<:header>
<.typography variant="h2" margin={false}>
Use Google's location service?
</.typography>
</:header>
<:content>
<.typography margin={false}>
Let Google help apps determine location. This means sending anonymous location data to Google, even when no apps are running.
</.typography>
</:content>
<:actions>
<.button variant="text" color="slate" extend_class="mr-4">Disagree</.button>
<.button variant="text">Agree</.button>
</:actions>
</.modal>
```
Show modal matching selector.
examples
Examples
iex> show_modal(selector)
%JS{}
iex> show_modal(js, selector)
%JS{}