Sha256: 85fa91754e41245ad60b3e2b361b67bdf86980ed747b2668faf9491b449c3673
Contents?: true
Size: 709 Bytes
Versions: 23
Compression:
Stored size: 709 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: :tertiary, p: 3)) { "Hello world" } %> # # @param system_arguments [Hash] <%= link_to_system_arguments_docs %> def initialize(**system_arguments) @system_arguments = system_arguments @system_arguments[:tag] = :div end def call render(Primer::BaseComponent.new(**@system_arguments)) { content } end end end
Version data entries
23 entries across 23 versions & 1 rubygems