Sha256: 091083a328262bc5ae1a07e84cd576bca691c7f0bea91761b7afdc2694ffe60f

Contents?: true

Size: 453 Bytes

Versions: 16

Compression:

Stored size: 453 Bytes

Contents

# frozen_string_literal: true

class Avo::PanelComponent < ViewComponent::Base
  renders_one :tools
  renders_one :body
  renders_one :bare_content
  renders_one :footer

  def initialize(title: nil, body_classes: nil, data: {})
    @title = title
    @body_classes = body_classes
    @data = data
  end

  private

  def data_attributes
    return if @data.blank?

    @data.map do |key, value|
      " data-#{key}=\"#{value}\""
    end.join
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
avo-1.3.0 app/components/avo/panel_component.rb
avo-1.2.11.pre.4 app/components/avo/panel_component.rb
avo-1.2.11.pre.3 app/components/avo/panel_component.rb
avo-1.2.11.pre.2 app/components/avo/panel_component.rb
avo-1.2.11.pre.1 app/components/avo/panel_component.rb
avo-1.2.10 app/components/avo/panel_component.rb
avo-1.2.9 app/components/avo/panel_component.rb
avo-1.2.8 app/components/avo/panel_component.rb
avo-1.2.7 app/components/avo/panel_component.rb
avo-1.2.6 app/components/avo/panel_component.rb
avo-1.2.6.pre.1 app/components/avo/panel_component.rb
avo-1.2.5 app/components/avo/panel_component.rb
avo-1.2.4 app/components/avo/panel_component.rb
avo-1.2.3 app/components/avo/panel_component.rb
avo-1.3.0.pre.1 app/components/avo/panel_component.rb
avo-1.2.2 app/components/avo/panel_component.rb