Sha256: 1064683e00975adab0ac84642de8d84e1c7aaba88d39943e8c435f24acbdf4bc
Contents?: true
Size: 734 Bytes
Versions: 11
Compression:
Stored size: 734 Bytes
Contents
# frozen_string_literal: true module Primer # The Text component is a wrapper component that will apply typography styles to the text inside. class TextComponent < Primer::Component status :beta # @example Default # <%= render(Primer::TextComponent.new(tag: :p, font_weight: :bold)) { "Bold Text" } %> # <%= render(Primer::TextComponent.new(tag: :p, color: :text_danger)) { "Danger Text" } %> # # @param system_arguments [Hash] <%= link_to_system_arguments_docs %> def initialize(**system_arguments) @system_arguments = system_arguments @system_arguments[:tag] ||= :span end def call render(Primer::BaseComponent.new(**@system_arguments)) { content } end end end
Version data entries
11 entries across 11 versions & 1 rubygems