Sha256: e43c347c6fcf70f64dfe07205720f7d9678501752185e31866618e17964a55fb
Contents?: true
Size: 758 Bytes
Versions: 3
Compression:
Stored size: 758 Bytes
Contents
# frozen_string_literal: true module Primer # A basic wrapper component for most layout related needs. class BoxComponent < Primer::Component # @example auto|Default # <%= render(Primer::BoxComponent.new) { "Your content here" } %> # # @example auto|Color and padding # <%= render(Primer::BoxComponent.new(bg: :gray, 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 def self.status Primer::Component::STATUSES[:stable] end end end
Version data entries
3 entries across 3 versions & 1 rubygems