Browse Source

button_tag

main
pvincent 5 days ago
parent
commit
f5712eed3d
  1. 4
      app/views/notification/index.html.erb

4
app/views/notification/index.html.erb

@ -88,13 +88,13 @@
</h2> </h2>
<ul class="flex flex-row list bg-base-100 rounded-box shadow-md"> <ul class="flex flex-row list bg-base-100 rounded-box shadow-md">
<li class="p-4 pb-2 text-xs opacity-60 tracking-wide"> <li class="p-4 pb-2 text-xs opacity-60 tracking-wide">
<%= link_to 'Notice', "javascript: window.dispatchEvent(new CustomEvent('popup-toast', {detail: {
<%= button_tag 'Notice', onclick: "window.dispatchEvent(new CustomEvent('popup-toast', {detail: {
type: 'notice', type: 'notice',
message: 'this is a message from within Stimulus' message: 'this is a message from within Stimulus'
}}))", class: 'btn btn-primary' %> }}))", class: 'btn btn-primary' %>
</li> </li>
<li class="p-4 pb-2 text-xs opacity-60 tracking-wide"> <li class="p-4 pb-2 text-xs opacity-60 tracking-wide">
<%= link_to 'Alert', "javascript: window.dispatchEvent(new CustomEvent('popup-toast', {detail: {
<%= button_tag 'Alert', onclick: "window.dispatchEvent(new CustomEvent('popup-toast', {detail: {
type: 'alert', type: 'alert',
message: 'this is an alert by the way' message: 'this is an alert by the way'
}}))", class: 'btn btn-secondary' %> }}))", class: 'btn btn-secondary' %>

Loading…
Cancel
Save