app/components/coco/messaging/alert/alert.html.erb in coveragebook_components-0.17.5 vs app/components/coco/messaging/alert/alert.html.erb in coveragebook_components-0.17.6
- old
+ new
@@ -2,27 +2,29 @@
data: "alertMessage",
bind: "root",
show: "!dismissed",
cloak: (true if cloak?)
}, class: {
- "with-title": title?,
+ "with-title": title? && title.present?,
"with-action": action? || secondary_action?,
"vivid": vivid?
}) do %>
<div class="alert-container">
<div class="alert-stamp" data-role="icon">
<%= stamp %>
</div>
<div class="alert-body">
<div class="alert-content" data-role="content">
- <% if title? %>
+ <% if title? && title.present? %>
<h4 class="alert-title"><%= title %></h4>
<% end %>
- <p class="alert-message"<% if single_line? %> x-dimensions="checkSingleLineWrap(dimensions)"<% end %>>
- <%= message? ? message : content %>
- </p>
+ <% if message? || content %>
+ <p class="alert-message"<% if single_line? %> x-dimensions="checkSingleLineWrap(dimensions)"<% end %>>
+ <%= message? ? message : content %>
+ </p>
+ <% end %>
<% if link? %>
<div class="alert-link" data-role="link">
<%= helpers.coco_link(
*@link_data[:args],
\ No newline at end of file