Class: SdrViewComponents::Structure::StyleOverrideDarkComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/sdr_view_components/structure/style_override_dark_component.rb

Overview

Component for proving style overrides for dark variant header. Used to set custom background color if provided.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseComponent

#args_for, #merge_actions, #merge_classes

Constructor Details

#initialize(background_color:) ⇒ StyleOverrideDarkComponent

Returns a new instance of StyleOverrideDarkComponent.



8
9
10
11
# File 'app/components/sdr_view_components/structure/style_override_dark_component.rb', line 8

def initialize(background_color:)
  @background_color = background_color
  super()
end

Instance Attribute Details

#background_colorObject (readonly)

Returns the value of attribute background_color.



13
14
15
# File 'app/components/sdr_view_components/structure/style_override_dark_component.rb', line 13

def background_color
  @background_color
end