Class: UI::ScrollAreaCornerComponent

Inherits:
ViewComponent::Base
  • Object
show all
Includes:
ScrollAreaCornerBehavior
Defined in:
app/view_components/ui/scroll_area_corner_component.rb

Overview

CornerComponent - ViewComponent implementation

Intersection element between vertical and horizontal scrollbars.

Examples:

Default usage (automatically used by ScrollAreaComponent)

<%= render UI::CornerComponent.new %>

Instance Method Summary collapse

Methods included from ScrollAreaCornerBehavior

#scroll_area_corner_classes, #scroll_area_corner_html_attributes

Constructor Details

#initialize(classes: "", **attributes) ⇒ ScrollAreaCornerComponent

Returns a new instance of ScrollAreaCornerComponent.

Parameters:

  • classes (String) (defaults to: "")

    Additional CSS classes to merge

  • attributes (Hash)

    Additional HTML attributes



14
15
16
17
# File 'app/view_components/ui/scroll_area_corner_component.rb', line 14

def initialize(classes: "", **attributes)
  @classes = classes
  @attributes = attributes
end

Instance Method Details

#callObject



19
20
21
# File 'app/view_components/ui/scroll_area_corner_component.rb', line 19

def call
   :div, nil, **scroll_area_corner_html_attributes.deep_merge(@attributes)
end