Last active
December 30, 2020 18:26
-
-
Save songjiz/84c0952904e13f68ed4d80160af48195 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% heading ||= '' %> | |
<% dismissible ||= false %> | |
<% flash.each do |type, msg| %> | |
<div class="alert alert-<%= type %> alert-dismissible" role="alert"> | |
<% if heading.present? %> | |
<h4 class="alert-heading"><%= heading %></h4> | |
<% end %> | |
<div><%= msg %></div> | |
<% if dismissible %> | |
<button class="close" type="button" data-dismiss="alert" aria-label="Close"> | |
<span aria-hidden="true">×</span> | |
</button> | |
<% end %> | |
</div> | |
<% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% flash.each do |type, msg| %> | |
<div class="<%= class_names(['notification', { 'is-info' => (type == 'notice'), 'is-warning' => (type == 'warning'), 'is-danger' => (type == 'alert') }])%>"> | |
<button type="button" class="delete"></button> | |
<%= msg %> | |
</div> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment