Class: Protos::Command

Inherits:
Component
  • Object
show all
Defined in:
lib/protos/command.rb,
lib/protos/command/item.rb,
lib/protos/command/list.rb,
lib/protos/command/empty.rb,
lib/protos/command/group.rb,
lib/protos/command/input.rb,
lib/protos/command/title.rb,
lib/protos/command/dialog.rb,
lib/protos/command/trigger.rb

Defined Under Namespace

Classes: Dialog, Empty, Group, Input, Item, List, Title, Trigger

Instance Method Summary collapse

Methods inherited from Component

#initialize

Constructor Details

This class inherits a constructor from Protos::Component

Instance Method Details

#dialogObject



19
# File 'lib/protos/command.rb', line 19

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

#emptyObject



27
# File 'lib/protos/command.rb', line 27

def empty(...) = render Command::Empty.new(...)

#groupObject



23
# File 'lib/protos/command.rb', line 23

def group(...) = render Command::Group.new(...)

#inputObject



13
# File 'lib/protos/command.rb', line 13

def input(...) = render Command::Input.new(...)

#itemObject



25
# File 'lib/protos/command.rb', line 25

def item(...) = render Command::Item.new(...)

#listObject



15
# File 'lib/protos/command.rb', line 15

def list(...) = render Command::List.new(...)

#titleObject



21
# File 'lib/protos/command.rb', line 21

def title(...) = render Command::Title.new(...)

#triggerObject



17
# File 'lib/protos/command.rb', line 17

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

#view_templateObject

DOCS: A command pallete component that can be used to trigger a modal with filterable list of commands. Command modals are by default closable by clicking the overlay rather than a specific close button.



9
10
11
# File 'lib/protos/command.rb', line 9

def view_template(&)
  div(**attrs, &)
end