Class: JetUi::Popover::TriggerComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- JetUi::Popover::TriggerComponent
- Defined in:
- app/components/jet_ui/popover/trigger_component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(as: nil, **options) ⇒ TriggerComponent
constructor
A new instance of TriggerComponent.
Constructor Details
#initialize(as: nil, **options) ⇒ TriggerComponent
Returns a new instance of TriggerComponent.
6 7 8 9 |
# File 'app/components/jet_ui/popover/trigger_component.rb', line 6 def initialize(as: nil, **) @as = as @options = end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/components/jet_ui/popover/trigger_component.rb', line 11 def call if @as helpers.jet_ui.public_send(@as, **@options) { content } else content_tag :span, content, **@options end end |