Sha256: 8b6cda6a526ba97fd287df6efe720c6388b3a4531860a32c604831f308198ae5
Contents?: true
Size: 461 Bytes
Versions: 8
Compression:
Stored size: 461 Bytes
Contents
# frozen_string_literal: true module Primer class LinkComponent < Primer::Component def initialize(href:, muted: false, **kwargs) @kwargs = kwargs @kwargs[:tag] = :a @kwargs[:href] = href @kwargs[:classes] = class_names( @kwargs[:classes], "muted-link" => fetch_or_fallback([true, false], muted, false) ) end def call render(Primer::BaseComponent.new(**@kwargs)) { content } end end end
Version data entries
8 entries across 8 versions & 1 rubygems