class Primer::LinkComponent

Use links for moving from one page to another. The Link component styles anchor tags with default blue styling and hover text-decoration.

def call

def call
  render(Primer::BaseComponent.new(**@system_arguments)) { content }
end

def initialize(href:, muted: false, **system_arguments)

Parameters:
  • system_arguments (Hash) -- <%= link_to_system_arguments_docs %>
  • muted (Boolean) -- Uses light gray for Link color, and blue on hover
  • href (String) -- URL to be used for the Link

Other tags:
    Example: Muted -
    Example: Default -
def initialize(href:, muted: false, **system_arguments)
  @system_arguments = system_arguments
  @system_arguments[:tag] = :a
  @system_arguments[:href] = href
  @system_arguments[:classes] = class_names(
    @system_arguments[:classes],
    "muted-link" => fetch_or_fallback_boolean(muted, false)
  )
end