Sha256: 4c667184f750b3f87a7a5f2763735e28b7665f349e854148c6ae4bed94f50ac4

Contents?: true

Size: 847 Bytes

Versions: 2

Compression:

Stored size: 847 Bytes

Contents

<%= content_tag :div, html_attributes.merge(id: id, class: root_classes, role: :alert) do %>
  <%= content_tag :div, class: theme.classname("wrapper.base") do %>
    <% if icon? %>
      <%= icon %>
      <%= content_tag :div,
                      t(severity, scope: "fox_tail.alert.severity", default: severity.to_s.humanize),
                      class: theme.classname("accessibility.sr_only") %>
    <% end %>
    <%= header? ? header : content_tag(:div, content) %>
    <%= dismiss_icon if dismiss_icon? %>
  <% end %>
  <% if header? && content? %>
    <%= content_tag :div, content, class: theme.classname("content.base") %>
  <% end %>
  <% if buttons? %>
    <%= content_tag :div, class: theme.classname("buttons.container") do %>
      <% buttons.each do |btn| %>
        <%= btn %>
      <% end %>
    <% end %>
  <% end %>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fox_tail-0.1.1 app/components/fox_tail/alert_component.html.erb
fox_tail-0.1.0 app/components/fox_tail/alert_component.html.erb