Class: Railsboot::BlankSlateComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/railsboot/blank_slate_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(tag: "div", **html_attributes) ⇒ BlankSlateComponent

Returns a new instance of BlankSlateComponent.



8
9
10
11
12
13
14
15
16
# File 'app/components/railsboot/blank_slate_component.rb', line 8

def initialize(tag: "div", **html_attributes)
  @tag = tag
  @html_attributes = html_attributes

  @html_attributes[:class] = class_names(
    "text-center",
    html_attributes.delete(:class)
  )
end