Class: UI::MenubarSeparatorComponent

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

Overview

SeparatorComponent - ViewComponent implementation

Visual separator between menu items.

Examples:

Basic usage

render UI::SeparatorComponent.new

Instance Method Summary collapse

Methods included from MenubarSeparatorBehavior

#menubar_separator_classes, #menubar_separator_data_attributes, #menubar_separator_html_attributes

Constructor Details

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

Returns a new instance of MenubarSeparatorComponent.



12
13
14
15
# File 'app/view_components/ui/menubar_separator_component.rb', line 12

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

Instance Method Details

#callObject



17
18
19
# File 'app/view_components/ui/menubar_separator_component.rb', line 17

def call
   :div, "", **menubar_separator_html_attributes.deep_merge(@attributes)
end