Class: Maquina::Navbar::Notification

Inherits:
Phlex::HTML
  • Object
show all
Includes:
ApplicationView
Defined in:
app/views/maquina/navbar/notification.rb

Instance Method Summary collapse

Methods included from ApplicationView

#attribute_human_name, #button_to, #image_tag, #link_to, #model_human_name, #svg_icon

Constructor Details

#initialize(desktop: true) ⇒ Notification

Returns a new instance of Notification.



8
9
10
# File 'app/views/maquina/navbar/notification.rb', line 8

def initialize(desktop: true)
  @desktop = desktop
end

Instance Method Details

#view_template(&block) ⇒ Object



12
13
14
15
16
17
# File 'app/views/maquina/navbar/notification.rb', line 12

def view_template(&block)
  button(**button_attributes) do
    span(class: "sr-only") { "View notifications" }
    svg_icon(:fill, icon: notification_icon)
  end
end