Method: Primer::OpenProject::GridLayout::Area#initialize

Defined in:
app/components/primer/open_project/grid_layout/area.rb

#initialize(css_class, area_name, component = ::Primer::BaseComponent, tag: DEFAULT_TAG, **system_arguments) ⇒ Area



18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'app/components/primer/open_project/grid_layout/area.rb', line 18

def initialize(css_class, area_name, component = ::Primer::BaseComponent, tag: DEFAULT_TAG, **system_arguments)
  @component = component
  @system_arguments = system_arguments
  @styles = [
    "grid-area: #{area_name}"
  ]
  @system_arguments[:tag] = fetch_or_fallback(TAG_OPTIONS, tag, DEFAULT_TAG)
  @system_arguments[:style] = join_style_arguments(@system_arguments[:style], *@styles)
  @system_arguments[:classes] = class_names(
    @system_arguments[:classes],
    "#{css_class}--#{area_name}"
  )
end