Sha256: e57f245908e72475bc6ea0267b5a39e2671b3fd3dcd3bc7a5dc6beaff15a4a59

Contents?: true

Size: 843 Bytes

Versions: 19

Compression:

Stored size: 843 Bytes

Contents

# frozen_string_literal: true

class Avo::ProfileItemComponent < Avo::BaseComponent
  attr_reader :label
  attr_reader :icon
  attr_reader :path
  attr_reader :active
  attr_reader :target
  attr_reader :method
  attr_reader :params
  attr_reader :classes

  def initialize(label: nil, icon: nil, path: nil, active: :inclusive, target: nil, title: nil, method: nil, params: {}, classes: "")
    @label = label
    @icon = icon
    @path = path
    @active = active
    @target = target
    @title = title
    @method = method
    @params = params
    @classes = classes
  end

  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

19 entries across 19 versions & 1 rubygems

Version Path
avo-3.11.7 app/components/avo/profile_item_component.rb
avo-3.11.6 app/components/avo/profile_item_component.rb
avo-3.11.5 app/components/avo/profile_item_component.rb
avo-3.11.4 app/components/avo/profile_item_component.rb
avo-3.11.3 app/components/avo/profile_item_component.rb
avo-3.11.2 app/components/avo/profile_item_component.rb
avo-3.11.1 app/components/avo/profile_item_component.rb
avo-3.11.0 app/components/avo/profile_item_component.rb
avo-3.10.10 app/components/avo/profile_item_component.rb
avo-3.10.9 app/components/avo/profile_item_component.rb
avo-3.10.8 app/components/avo/profile_item_component.rb
avo-3.10.7 app/components/avo/profile_item_component.rb
avo-3.10.6 app/components/avo/profile_item_component.rb
avo-3.10.5 app/components/avo/profile_item_component.rb
avo-3.10.4 app/components/avo/profile_item_component.rb
avo-3.10.3 app/components/avo/profile_item_component.rb
avo-3.10.2 app/components/avo/profile_item_component.rb
avo-3.10.1 app/components/avo/profile_item_component.rb
avo-3.10.0 app/components/avo/profile_item_component.rb