Sha256: 78bbd7458cfc3fb63110f57f31e73456ed845ec461280fcd34ffdb5615a271ad

Contents?: true

Size: 831 Bytes

Versions: 2

Compression:

Stored size: 831 Bytes

Contents

# frozen_string_literal: true

module Yattho
  module Alpha
    class Dialog
      # A `Dialog::Body` is a compositional component, used to render the
      # Body of a dialog. See <%= link_to_component(Yattho::Alpha::Dialog) %>.
      class Body < Yattho::Component
        status :alpha
        audited_at "2022-10-10"

        # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
        def initialize(**system_arguments)
          @system_arguments = deny_tag_argument(**system_arguments)
          @system_arguments[:tag] = :div
          @system_arguments[:classes] = class_names(
            "Overlay-body",
            system_arguments[:classes]
          )
        end

        def call
          render(Yattho::BaseComponent.new(**@system_arguments)) { content }
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yattho_view_components-0.1.1 app/components/yattho/alpha/dialog/body.rb
yattho_view_components-0.0.1 app/components/yattho/alpha/dialog/body.rb