Method: Primer::Alpha::HellipButton#initialize

Defined in:
app/components/primer/alpha/hellip_button.rb

#initialize(inline: false, disabled: false, **system_arguments) ⇒ HellipButton

Returns a new instance of HellipButton.

Parameters:

  • inline (Boolean) (defaults to: false)

    Whether or not the button is inline.

  • disabled (Boolean) (defaults to: false)

    Whether or not the button is disabled.

  • system_arguments (Hash)

    <%= link_to_system_arguments_docs %>

[View source]

15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'app/components/primer/alpha/hellip_button.rb', line 15

def initialize(inline: false, disabled: false, **system_arguments)
  @system_arguments = deny_tag_argument(**system_arguments)

  validate_aria_label

  @system_arguments[:tag] = :button
  @system_arguments[:"aria-expanded"] = false
  @system_arguments[:classes] = class_names(
    @system_arguments[:classes],
    "inline" => inline
  )
  @system_arguments[:disabled] = disabled
end