class Primer::Alpha::HellipButton

  • Set the attribute ‘aria-label` on the system arguments. E.g. `Primer::Alpha::HellipButton.new(“aria-label”: “Expand next part”)`
    * This button is displaying a hellip as its content (The three dots character). Therefore a label is needed for screen readers.
    Always set an accessible label to help the user interact with the component.
    @accessibility
    Use `HellipButton` to render a button with a hellip. Often used for hidden text expanders.

def call

def call
  render(Primer::Beta::BaseButton.new(**@system_arguments)) { "…".html_safe }
end

def initialize(inline: false, disabled: false, **system_arguments)

Parameters:
  • system_arguments (Hash) -- <%= link_to_system_arguments_docs %>
  • disabled (Boolean) -- Whether or not the button is disabled.
  • inline (Boolean) -- Whether or not the button is inline.
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