Sha256: 6b772ba3ce408f619bca7173ec6ce41dd270711a89354c98d5def8125205a54e

Contents?: true

Size: 587 Bytes

Versions: 69

Compression:

Stored size: 587 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: {}, display_breadcrumbs: false)
    @title = title
    @body_classes = body_classes
    @data = data
    @display_breadcrumbs = display_breadcrumbs
  end

  private

  def data_attributes
    return if @data.blank?

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

  def display_breadcrumbs?
    @display_breadcrumbs
  end
end

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
avo-1.18.2 app/components/avo/panel_component.rb
avo-1.18.2.pre.0 app/components/avo/panel_component.rb
avo-1.18.1 app/components/avo/panel_component.rb
avo-1.18.0 app/components/avo/panel_component.rb
avo-1.18.0.pre.3 app/components/avo/panel_component.rb
avo-1.18.0.pre.2 app/components/avo/panel_component.rb
avo-1.18.0.pre.1 app/components/avo/panel_component.rb
avo-1.17.1 app/components/avo/panel_component.rb
avo-1.17.0 app/components/avo/panel_component.rb
avo-1.16.4 app/components/avo/panel_component.rb
avo-1.16.3 app/components/avo/panel_component.rb
avo-1.16.2 app/components/avo/panel_component.rb
avo-1.16.1 app/components/avo/panel_component.rb
avo-1.16.0 app/components/avo/panel_component.rb
avo-1.15.0 app/components/avo/panel_component.rb
avo-1.15.0.pre.1 app/components/avo/panel_component.rb
avo-1.14.0 app/components/avo/panel_component.rb
avo-1.13.3 app/components/avo/panel_component.rb
avo-1.13.2 app/components/avo/panel_component.rb
avo-1.13.1 app/components/avo/panel_component.rb