Class: Protos::Command::Dialog

Inherits:
Protos::Component show all
Defined in:
lib/protos/command/dialog.rb

Instance Method Summary collapse

Methods inherited from Protos::Component

#initialize

Constructor Details

This class inherits a constructor from Protos::Component

Instance Method Details

#view_template(&block) ⇒ Object

DOCS: The dialog for a command wraps the command content and provides a modal backdrop for the command when it is opened.



9
10
11
12
13
14
15
16
# File 'lib/protos/command/dialog.rb', line 9

def view_template(&block)
  dialog(**attrs) do
    div(class: css[:modal], &block)
    form(method: :dialog, class: css[:form]) do
      button { "close" }
    end
  end
end