Sha256: f730c116601a9e3e8358611a5f3897eb5a23beb04fdb6ff8ae987d482f7c3d44

Contents?: true

Size: 421 Bytes

Versions: 13

Compression:

Stored size: 421 Bytes

Contents

# frozen_string_literal: true

class Avo::PanelComponent < ViewComponent::Base
  with_content_areas :tools, :body, :bare_content, :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

13 entries across 13 versions & 1 rubygems

Version Path
avo-1.1.0 app/components/avo/panel_component.rb
avo-1.1.0.pre.1 app/components/avo/panel_component.rb
avo-1.0.5 app/components/avo/panel_component.rb
avo-1.0.4 app/components/avo/panel_component.rb
avo-1.0.2 app/components/avo/panel_component.rb
avo-1.0.1 app/components/avo/panel_component.rb
avo-1.0.0 app/components/avo/panel_component.rb
avo-0.5.0.beta15 app/components/avo/panel_component.rb
avo-0.5.0.beta14 app/components/avo/panel_component.rb
avo-0.5.0.beta13 app/components/avo/panel_component.rb
avo-0.5.0.beta12 app/components/avo/panel_component.rb
avo-0.5.0.beta11 app/components/avo/panel_component.rb
avo-0.5.0.beta10 app/components/avo/panel_component.rb