Sha256: 87dc60f777f13ee6f3f12dd959a9594387e0a9419d0f813aaa958aed6e29e47f
Contents?: true
Size: 544 Bytes
Versions: 10
Compression:
Stored size: 544 Bytes
Contents
# frozen_string_literal: true module Primer class UnderlineNavComponent < Primer::Component ALIGN_DEFAULT = :left ALIGN_OPTIONS = [ALIGN_DEFAULT, :right] with_content_areas :body, :actions def initialize(align: ALIGN_DEFAULT, **kwargs) @align = fetch_or_fallback(ALIGN_OPTIONS, align, ALIGN_DEFAULT) @kwargs = kwargs @kwargs[:tag] = :nav @kwargs[:classes] = class_names( @kwargs[:classes], "UnderlineNav", "UnderlineNav--right" => @align == :right ) end end end
Version data entries
10 entries across 10 versions & 1 rubygems