Sha256: 3e92b7ead67ee11bac702802866b56776ba458a0630bfcc0d7d2a58b3bcb713f
Contents?: true
Size: 729 Bytes
Versions: 26
Compression:
Stored size: 729 Bytes
Contents
# frozen_string_literal: true module Primer # `Box` is a basic wrapper component for most layout related needs. class BoxComponent < Primer::Component status :stable # @example Default # <%= render(Primer::BoxComponent.new) { "Your content here" } %> # # @example Color and padding # <%= render(Primer::BoxComponent.new(bg: :subtle, p: 3)) { "Hello world" } %> # # @param system_arguments [Hash] <%= link_to_system_arguments_docs %> def initialize(**system_arguments) @system_arguments = deny_tag_argument(**system_arguments) @system_arguments[:tag] = :div end def call render(Primer::BaseComponent.new(**@system_arguments)) { content } end end end
Version data entries
26 entries across 26 versions & 1 rubygems