Module: UI::InputGroupButtonBehavior
- Included in:
- InputGroupButton, InputGroupButtonComponent
- Defined in:
- app/helpers/ui/input_group_button_behavior.rb,
app/behaviors/ui/input_group_button_behavior.rb
Overview
UI::InputGroupButtonBehavior
Instance Method Summary collapse
-
#input_group_button_attributes ⇒ Object
Returns attributes to pass to the button component.
-
#input_group_button_classes ⇒ Object
Returns combined CSS classes for the button.
-
#input_group_button_html_attributes ⇒ Object
Returns HTML attributes for the input group button.
Instance Method Details
#input_group_button_attributes ⇒ Object
Returns attributes to pass to the button component
14 15 16 17 18 19 20 21 22 |
# File 'app/helpers/ui/input_group_button_behavior.rb', line 14 def attributes_value = respond_to?(:attributes, true) ? attributes : @attributes { type: @type, variant: @variant, classes: , "data-size": @size }.merge(attributes_value).compact end |
#input_group_button_classes ⇒ Object
Returns combined CSS classes for the button
25 26 27 28 29 30 31 32 33 |
# File 'app/helpers/ui/input_group_button_behavior.rb', line 25 def classes_value = respond_to?(:classes, true) ? classes : @classes TailwindMerge::Merger.new.merge([ , , , classes_value ].compact.join(" ")) end |
#input_group_button_html_attributes ⇒ Object
Returns HTML attributes for the input group button
9 10 11 |
# File 'app/helpers/ui/input_group_button_behavior.rb', line 9 def end |