Class: Protos::Modal

Inherits:
Component show all
Defined in:
lib/protos/modal.rb,
lib/protos/modal/dialog.rb,
lib/protos/modal/trigger.rb,
lib/protos/modal/close_button.rb

Defined Under Namespace

Classes: CloseButton, Dialog, Trigger

Instance Method Summary collapse

Methods inherited from Component

#initialize

Constructor Details

This class inherits a constructor from Protos::Component

Instance Method Details

#close_buttonObject



12
# File 'lib/protos/modal.rb', line 12

def close_button(...) = render CloseButton.new(...)

#dialogObject



14
# File 'lib/protos/modal.rb', line 14

def dialog(...) = render Dialog.new(...)

#triggerObject



16
# File 'lib/protos/modal.rb', line 16

def trigger(...) = render Trigger.new(...)

#view_templateObject

DOCS: A modal component that can be triggered by a button or a link and will open a fullscreen modal, usually with a close button.



8
9
10
# File 'lib/protos/modal.rb', line 8

def view_template(&)
  div(**attrs, class: css[:container], &)
end