Sha256: f923f40289b8ef0dd996dd9f521c496d90ee510d36a5f878fff0f7a53a0b35b5
Contents?: true
Size: 707 Bytes
Versions: 6
Compression:
Stored size: 707 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 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
6 entries across 6 versions & 1 rubygems