Class: UI::AlertDialogTrigger
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::AlertDialogTrigger
- Includes:
- AlertDialogTriggerBehavior
- Defined in:
- app/components/ui/alert_dialog_trigger.rb
Overview
Trigger - Phlex implementation
A wrapper that adds the alert dialog open action to its child element. Uses AlertDialogTriggerBehavior module for shared styling logic.
Instance Method Summary collapse
-
#initialize(classes: "", **attributes) ⇒ AlertDialogTrigger
constructor
A new instance of AlertDialogTrigger.
- #view_template(&block) ⇒ Object
Methods included from AlertDialogTriggerBehavior
#alert_dialog_trigger_base_classes, #alert_dialog_trigger_classes, #alert_dialog_trigger_data_attributes, #alert_dialog_trigger_html_attributes, #merged_alert_dialog_trigger_data_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ AlertDialogTrigger
Returns a new instance of AlertDialogTrigger.
17 18 19 20 |
# File 'app/components/ui/alert_dialog_trigger.rb', line 17 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
22 23 24 25 26 |
# File 'app/components/ui/alert_dialog_trigger.rb', line 22 def view_template(&block) div(**alert_dialog_trigger_html_attributes) do yield if block_given? end end |