Class: Protos::Toast::CloseButton

Inherits:
Component
  • Object
show all
Defined in:
lib/protos/toast/close_button.rb

Instance Method Summary collapse

Methods inherited from Component

#initialize

Constructor Details

This class inherits a constructor from Protos::Component

Instance Method Details

#view_template(&block) ⇒ Object

DOCS: A close button for a toast



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/protos/toast/close_button.rb', line 8

def view_template(&block)
  form(method: :dialog, class: css[:form]) do
    button(
      aria_label: "close",
      autofocus: true,
      formmethod: :dialog,
      formnovalidate: true,
      **attrs,
      &block
    )
  end
end