Sha256: 3760a34bfafc3127a23303a555707e3005f044373d034d54a66a81fbede9eb0c
Contents?: true
Size: 864 Bytes
Versions: 24
Compression:
Stored size: 864 Bytes
Contents
class NotificationComponent < BaseComponent def initialize(notification: nil) @notification = notification super end erb_template <<~ERB <div class="notification d-flex flex-column flex-sm-row justify-content-between <%= 'unseen' if @notification.unseen? %>" id="<%= dom_id(@notification) %>" data-id="<%= @notification.id %>"> <div class="pe-3"> <%= @notification.message.html_safe %> </div> <div class="notification--time d-flex flex-column justify-content-end text-body-tertiary text-end"> <div> hace <%= distance_of_time_in_words @notification.created_at, Time.zone.now %> </div> <div> <a href="javascript:void" class="link-opacity-50" data-action="notifications#markAsUnseen">Marcar como no leĆdo</a> </div> </div> </div> ERB end
Version data entries
24 entries across 24 versions & 1 rubygems