livebook/lib/livebook_web/templates/layout/live.html.heex

34 lines
1.7 KiB
Text
Raw Normal View History

<main role="main" class="flex-grow flex flex-col h-screen">
2021-10-27 23:04:33 +08:00
<div class="fixed right-8 bottom-5 z-50 flex flex-col space-y-3">
<%= if live_flash(@flash, :info) do %>
2021-10-27 23:04:33 +08:00
<div class="shadow-custom-1 max-w-2xl flex items-center space-x-3 rounded-lg px-4 py-2 border-l-4 rounded-l-none border-blue-500 bg-white text-gray-600 hover:bg-gray-50 hover:text-gray-500 cursor-pointer" role="alert"
phx-click="lv:clear-flash"
phx-value-key="info">
2021-10-27 23:04:33 +08:00
<.remix_icon icon="information-line" class="text-2xl text-blue-500" />
<span class="whitespace-pre-wrap"><%= live_flash(@flash, :info) %></span>
</div>
<% end %>
2021-01-08 05:13:17 +08:00
<%= if live_flash(@flash, :warning) do %>
2021-10-27 23:04:33 +08:00
<div class="shadow-custom-1 max-w-2xl flex items-center space-x-3 rounded-lg px-4 py-2 border-l-4 rounded-l-none border-yellow-300 bg-white text-gray-600 hover:bg-gray-50 hover:text-gray-500 cursor-pointer" role="alert"
phx-click="lv:clear-flash"
phx-value-key="warning">
<.remix_icon icon="alert-line" class="text-2xl text-yellow-400" />
<span class="whitespace-pre-wrap"><%= live_flash(@flash, :warning) %></span>
</div>
<% end %>
2021-10-27 23:04:33 +08:00
<%= if live_flash(@flash, :error) do %>
2021-10-27 23:04:33 +08:00
<div class="shadow-custom-1 max-w-2xl flex items-center space-x-3 rounded-lg px-4 py-2 border-l-4 rounded-l-none border-red-500 bg-white text-gray-600 hover:bg-gray-50 hover:text-gray-500 cursor-pointer" role="alert"
phx-click="lv:clear-flash"
phx-value-key="error">
2021-10-27 23:04:33 +08:00
<.remix_icon icon="close-circle-line" class="text-2xl text-red-500" />
<span class="whitespace-pre-wrap"><%= live_flash(@flash, :error) %></span>
</div>
<% end %>
2021-01-08 05:13:17 +08:00
</div>
2021-01-08 04:16:54 +08:00
<%= @inner_content %>
</main>