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.



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

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

Instance Method Details

#system_argumentsObject



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

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