Class: Protos::Popover

Inherits:
Component
  • Object
show all
Defined in:
lib/protos/popover.rb,
lib/protos/popover/content.rb,
lib/protos/popover/trigger.rb

Direct Known Subclasses

Combobox, Dropdown

Defined Under Namespace

Classes: Content, Trigger

Constant Summary collapse

Positions =
Types::Coercible::Symbol.enum(
  :top,
  :top_start,
  :top_end,
  :right,
  :right_start,
  :right_end,
  :bottom,
  :bottom_start,
  :bottom_end,
  :left,
  :left_start,
  :left_end
)
Animations =
Types::Coercible::Symbol.enum(
  :fade,
  :shift_away,
  :shift_away_subtle,
  :shift_away_extreme,
  :shift_towards,
  :shift_towards_subtle,
  :shift_towards_extreme,
  :scale,
  :scale_subtle,
  :scale_extreme,
  :perspective,
  :perspective_subtle,
  :perspective_extreme
)
Triggers =
Types::Coercible::Symbol.enum(
  :focus,
  :mouseenter,
  :click,
  :focusin,
  :manual
)

Instance Method Summary collapse

Methods inherited from Component

#initialize

Constructor Details

This class inherits a constructor from Protos::Component

Instance Method Details

#contentObject



90
# File 'lib/protos/popover.rb', line 90

def content(...) = render Content.new(...)

#triggerObject



92
# File 'lib/protos/popover.rb', line 92

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

#view_templateObject



86
87
88
# File 'lib/protos/popover.rb', line 86

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