Sha256: 6ea9eda5889a0855a7dd57b3a303f0ad2db639c4747950d63e50f303898ce3b7
Contents?: true
Size: 737 Bytes
Versions: 1
Compression:
Stored size: 737 Bytes
Contents
# frozen_string_literal: true module Primer # `Box` is a basic wrapper component for most layout related needs. class Box < Primer::Component warn_on_deprecated_slot_setter status :stable # @example Default # <%= render(Primer::Box.new) { "Your content here" } %> # # @example Color and padding # <%= render(Primer::Box.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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
primer_view_components-0.0.115 | app/components/primer/box.rb |