livebook/lib/livebook_web/templates/layout/live.html.heex
Jonatan Kłosko c1654345b7
Migrate to latest LV (#437)
* Update phoenix deps

* Update reference to LiveDashboard encode_pid

* Fix form input id references

* Move to HEEx

* Update back to filesystem LV npm package

* Further HEEx rewrites

* Refactor icons into function components

* .html.leex -> .html.heex

* Further refactoring

* Move render helpers into function components

* Add doctype back

* Further refactoring

* Refactor cell component

* Further refactoring

* Compose sidebar using function components

* Rewrite notebook card component as function component

* Fruther refactoring

* Fix race condition in runtime tests

* Rewrite tooltips into function component

* Update Tailwind purge rules

* Revert "Rewrite tooltips into function component"

This reverts commit bd6ca8f0b5.

* Refactor conditional tooltip
2021-07-07 14:32:49 +02:00

23 lines
1,016 B
Text

<main role="main" class="flex-grow flex flex-col h-screen">
<div class="fixed right-5 bottom-5 z-50 flex flex-col space-y-3">
<%= if live_flash(@flash, :info) do %>
<div class="flex items-center space-x-2 rounded-lg px-4 py-2 bg-blue-100 text-blue-600 hover:opacity-75 cursor-pointer" role="alert"
phx-click="lv:clear-flash"
phx-value-key="info">
<.remix_icon icon="information-line" class="text-2xl" />
<span class="whitespace-pre-wrap"><%= live_flash(@flash, :info) %></span>
</div>
<% end %>
<%= if live_flash(@flash, :error) do %>
<div class="flex items-center space-x-2 rounded-lg px-4 py-2 bg-red-100 text-red-400 hover:opacity-75 cursor-pointer" role="alert"
phx-click="lv:clear-flash"
phx-value-key="error">
<.remix_icon icon="error-warning-line" class="text-2xl" />
<span class="whitespace-pre-wrap"><%= live_flash(@flash, :error) %></span>
</div>
<% end %>
</div>
<%= @inner_content %>
</main>