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.13.0 app/components/avo/panel_component.rb
avo-1.12.4 app/components/avo/panel_component.rb
avo-1.12.3 app/components/avo/panel_component.rb
avo-1.12.2 app/components/avo/panel_component.rb
avo-1.12.1 app/components/avo/panel_component.rb
avo-1.12.0 app/components/avo/panel_component.rb
avo-1.11.6 app/components/avo/panel_component.rb
avo-1.11.5 app/components/avo/panel_component.rb
avo-1.11.4 app/components/avo/panel_component.rb
avo-1.11.3 app/components/avo/panel_component.rb
avo-1.11.2 app/components/avo/panel_component.rb
avo-1.11.1 app/components/avo/panel_component.rb
avo-1.10.3 app/components/avo/panel_component.rb
avo-1.11.0 app/components/avo/panel_component.rb
avo-1.10.2 app/components/avo/panel_component.rb
avo-1.10.1 app/components/avo/panel_component.rb
avo-1.10.0 app/components/avo/panel_component.rb
avo-1.9.1 app/components/avo/panel_component.rb
avo-1.9.0 app/components/avo/panel_component.rb
avo-1.8.4 app/components/avo/panel_component.rb