Sha256: 11296204d74a496f0c59d23b2b5da2e180947fd65e1b0fbe7c4341679e982e5f

Contents?: true

Size: 567 Bytes

Versions: 2

Compression:

Stored size: 567 Bytes

Contents

# frozen_string_literal: true

class Avo::PanelHeaderComponent < Avo::BaseComponent
  include Avo::ApplicationHelper

  renders_one :name_slot
  renders_one :tools

  prop :name
  prop :description
  prop :display_breadcrumbs, default: false
  prop :profile_photo

  private

  def display_breadcrumbs?
    @display_breadcrumbs && Avo.configuration.display_breadcrumbs
  end

  def description
    return @description if @description.present?

    ""
  end

  def render?
    @name.present? || description.present? || tools.present? || display_breadcrumbs?
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
avo-3.15.1 app/components/avo/panel_header_component.rb
avo-3.15.0 app/components/avo/panel_header_component.rb