Sha256: cb9f181bc513c437729f5df2ca4a1bd6df933d74b2adaac9722873a3e23bfc2e

Contents?: true

Size: 1020 Bytes

Versions: 6

Compression:

Stored size: 1020 Bytes

Contents

<%#
# Flash Partial

This partial renders flash messages on every page.

## Relevant Helpers:

- `flash`:
  Returns a hash,
  where the keys are the type of flash (alert, error, notice, etc)
  and the values are the message to be displayed.
%>
<% if flash.any? %>
  <div class="flashes">
    <% flash.each do |key, value| -%>
      <% next unless value.respond_to?(:html_safe) %>
      <div class="flash flash-<%= key %> bg-blue-100 border-t-4 border-blue-500 rounded-b text-blue-900 px-4 py-3 shadow-md" role="alert">
        <div class="flex">
          <div class="py-1"><svg class="fill-current h-6 w-6 text-blue-500 mr-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10 0C4.477 0 0 4.477 0 10s4.477 10 10 10 10-4.477 10-10S15.523 0 10 0zM9 15V9h2v6H9zm0-8V5h2v2H9z"/></svg></div>
          <div>
            <p class="font-bold"><%= flash_types(key) %></p>
            <p class="text-sm"><%= value.html_safe %></p>
          </div>
        </div>
      </div>
    <% end -%>
  </div>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
administrate_tailwind_theme-0.0.6 app/views/admin/application/_flashes.html.erb
administrate_tailwind_theme-0.0.5 app/views/admin/application/_flashes.html.erb
administrate_tailwind_theme-0.0.4 app/views/admin/application/_flashes.html.erb
administrate_tailwind_theme-0.0.3 app/views/admin/application/_flashes.html.erb
administrate_tailwind_theme-0.0.2 app/views/admin/application/_flashes.html.erb
administrate_tailwind_theme-0.0.1 app/views/admin/application/_flashes.html.erb