BUG: clear liveview (#22)

Fixes #18
This commit is contained in:
Matthew Ryan Dillon 2020-06-22 21:00:47 -07:00 committed by GitHub
parent 58ceec6d79
commit c1b72074ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View file

@ -1,14 +1,14 @@
<main role="main" class="container">
<%= if live_flash(@flash, :info) do %>
<p class="alert alert-info" role="alert" phx-click="lv:clear-flash" phx-value-key="info">
<button class="delete" onclick="this.parentNode.remove();"></button>
<p class="notification is-info" role="alert" phx-click="lv:clear-flash" phx-value-key="info">
<button class="delete" phx-click="lv:clear-flash" phx-value-key="info"></button>
<%= live_flash(@flash, :info) %>
</p>
<% end %>
<%= if live_flash(@flash, :error) do %>
<p class="alert alert-danger" role="alert" phx-click="lv:clear-flash" phx-value-key="error">
<button class="delete" onclick="this.parentNode.remove();"></button>
<p class="notification is-danger" role="alert" phx-click="lv:clear-flash" phx-value-key="error">
<button class="delete" phx-click="lv:clear-flash" phx-value-key="error"></button>
<%= live_flash(@flash, :error) %>
</p>
<% end %>