Class: Polaris::Frame::TopBarComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/polaris/frame/top_bar_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(logo:, **system_arguments) ⇒ TopBarComponent

Returns a new instance of TopBarComponent.



6
7
8
9
# File 'app/components/polaris/frame/top_bar_component.rb', line 6

def initialize(logo:, **system_arguments)
  @logo = .is_a?(Hash) ? Polaris::Logo.new(**) : 
  @system_arguments = system_arguments
end

Instance Method Details

#system_argumentsObject



11
12
13
14
15
16
17
18
19
# File 'app/components/polaris/frame/top_bar_component.rb', line 11

def system_arguments
  @system_arguments.tap do |opts|
    opts[:tag] = "div"
    opts[:classes] = class_names(
      @system_arguments[:classes],
      "Polaris-TopBar"
    )
  end
end