Class: UI::SelectScrollDownButtonComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::SelectScrollDownButtonComponent
- Includes:
- SelectScrollDownButtonBehavior
- Defined in:
- app/view_components/ui/select_scroll_down_button_component.rb
Overview
ScrollDownButtonComponent - ViewComponent implementation
Button that appears when content is scrollable downward. Automatically hidden when at bottom of list.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", **attributes) ⇒ SelectScrollDownButtonComponent
constructor
A new instance of SelectScrollDownButtonComponent.
Methods included from SelectScrollDownButtonBehavior
#select_scroll_down_button_classes, #select_scroll_down_button_data_attributes, #select_scroll_down_button_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ SelectScrollDownButtonComponent
Returns a new instance of SelectScrollDownButtonComponent.
15 16 17 18 |
# File 'app/view_components/ui/select_scroll_down_button_component.rb', line 15 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'app/view_components/ui/select_scroll_down_button_component.rb', line 20 def call content_tag :div, **.deep_merge(@attributes) do content_tag :svg, nil, class: "size-4", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", stroke_width: "2", stroke_linecap: "round", stroke_linejoin: "round" do content_tag :path, nil, d: "m6 9 6 6 6-6" end end end |