Class: Pajamas::EmptyStateComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/pajamas/empty_state_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(compact: false, title: nil, svg_path: nil, primary_button_text: nil, primary_button_link: nil, secondary_button_text: nil, secondary_button_link: nil, empty_state_options: {}) ⇒ EmptyStateComponent

Returns a new instance of EmptyStateComponent.

Parameters:

  • compact (Boolean) (defaults to: false)
  • title (String) (defaults to: nil)
  • svg_path (String) (defaults to: nil)
  • primary_button_text (String) (defaults to: nil)
  • primary_button_link (String) (defaults to: nil)
  • secondary_button_text (String) (defaults to: nil)
  • secondary_button_link (String) (defaults to: nil)
  • empty_state_options (Hash) (defaults to: {})


13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'app/components/pajamas/empty_state_component.rb', line 13

def initialize(
  compact: false,
  title: nil,
  svg_path: nil,
  primary_button_text: nil,
  primary_button_link: nil,
  secondary_button_text: nil,
  secondary_button_link: nil,
  empty_state_options: {}
)
  @compact = compact
  @title = title
  @svg_path = svg_path.to_s
  @primary_button_text = primary_button_text
  @primary_button_link = primary_button_link
  @secondary_button_text = secondary_button_text
  @secondary_button_link = secondary_button_link
  @empty_state_options = empty_state_options
end