Class: Railsboot::BlankSlateComponent

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

Overview

ViewComponent: renders the blank slate block.

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of BlankSlateComponent.



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

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

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