# frozen_string_literal: true module Yattho # `Box` is a basic wrapper component for most layout related needs. class Box < Yattho::Component status :stable # @example Default # <%= render(Yattho::Box.new) { "Your content here" } %> # # @example Color and padding # <%= render(Yattho::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(Yattho::BaseComponent.new(**@system_arguments)) { content } end end end