Class: Polaris::Frame::TopBarComponent
- Inherits:
-
Component
- Object
- Component
- Polaris::Frame::TopBarComponent
- Defined in:
- app/components/polaris/frame/top_bar_component.rb
Instance Method Summary collapse
-
#initialize(logo:, **system_arguments) ⇒ TopBarComponent
constructor
A new instance of TopBarComponent.
- #system_arguments ⇒ Object
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 = logo.is_a?(Hash) ? Polaris::Logo.new(**logo) : logo @system_arguments = system_arguments end |
Instance Method Details
#system_arguments ⇒ Object
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 |