Sha256: ecb1c95a22fe1397d6a6ad1aa7fd6170c6799f928c380f61b2fe7d951f27138a

Contents?: true

Size: 758 Bytes

Versions: 10

Compression:

Stored size: 758 Bytes

Contents

# frozen_string_literal: true

class Avo::ProfileItemComponent < Avo::BaseComponent
  prop :label, reader: :public
  prop :icon, reader: :public
  prop :path, reader: :public
  prop :active, default: :inclusive, reader: :public do |value|
    value&.to_sym
  end
  prop :target, reader: :public do |value|
    value&.to_sym
  end
  prop :title, reader: :public
  prop :method, reader: :public
  prop :params, default: {}.freeze, reader: :public
  prop :classes, default: "", reader: :public

  def title
    @title || @label
  end

  private

  def button_classes
    "flex-1 flex items-center justify-center bg-white text-left cursor-pointer text-gray-800 font-semibold hover:bg-primary-100 block px-4 py-1 w-full py-3 text-center rounded w-full"
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
avo-3.15.1 app/components/avo/profile_item_component.rb
avo-3.15.0 app/components/avo/profile_item_component.rb
avo-3.14.5 app/components/avo/profile_item_component.rb
avo-3.14.4 app/components/avo/profile_item_component.rb
avo-3.14.3 app/components/avo/profile_item_component.rb
avo-3.14.2 app/components/avo/profile_item_component.rb
avo-3.14.1 app/components/avo/profile_item_component.rb
avo-3.14.0 app/components/avo/profile_item_component.rb
avo-3.13.7 app/components/avo/profile_item_component.rb
avo-3.13.6 app/components/avo/profile_item_component.rb