Sha256: 05adad280fbc0c6073f41b09307e46c7851833c927238e3801915827c135f6f5
Contents?: true
Size: 712 Bytes
Versions: 3
Compression:
Stored size: 712 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 # @example auto|Default # <%= render(Primer::TextComponent.new(tag: :p, font_weight: :bold)) { "Bold Text" } %> # <%= render(Primer::TextComponent.new(tag: :p, color: :red_5)) { "Red 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
3 entries across 3 versions & 1 rubygems