Class: Primer::FlashComponent::Actions

Inherits:
ViewComponent::Slot
  • Object
show all
Includes:
ClassNameHelper
Defined in:
app/components/primer/flash_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ClassNameHelper

#class_names

Constructor Details

#initialize(**system_arguments) ⇒ Actions

Returns a new instance of Actions.

Parameters:

  • system_arguments (Hash)

    <%= link_to_system_arguments_docs %>



66
67
68
69
70
# File 'app/components/primer/flash_component.rb', line 66

def initialize(**system_arguments)
  @system_arguments = system_arguments
  @system_arguments[:tag] = :div
  @system_arguments[:classes] = class_names(@system_arguments[:classes], "flash-action")
end

Instance Attribute Details

#system_argumentsObject (readonly)

Returns the value of attribute system_arguments.



63
64
65
# File 'app/components/primer/flash_component.rb', line 63

def system_arguments
  @system_arguments
end