Files
fizzy/app/views/notifications/_tray.html.erb
T
2025-01-20 13:00:56 -06:00

22 lines
973 B
Plaintext

<%= turbo_stream_from Current.user, :notifications %>
<%= tag.dialog id: "notification-tray", class: "notification-tray flex flex-column gap unpad borderless",
data: { controller: "dialog", turbo_permanent: true, dialog_modal_value: false, dialog_target: "dialog", action: "keydown.esc@document->dialog#close click@document->dialog#closeOnClickOutside" } do %>
<%= turbo_frame_tag("notifications", src: notifications_tray_path) %>
<div class="flex align-center gap-half justify-space-between pad txt-small">
<%= link_to notifications_path, class: "btn" do %>
<%= image_tag "bell.svg", aria: { hidden: true }, size: 24 %>
<span>See all notifications</span>
<% end %>
<button class="btn">
Mark all as read
</button>
</div>
<button class="notification-tray__expander borderless unpad fill-transparent" data-action="dialog#toggle">
<span class="for-screen-reader">Expand notifications stack</span>
</button>
<% end %>