Sha256: 6b327d00b23138cf1e88f7476937648ceb3d561e7409af7aaf4e3824e49282a5

Contents?: true

Size: 844 Bytes

Versions: 115

Compression:

Stored size: 844 Bytes

Contents

# frozen_string_literal: true

class Avo::ProfileItemComponent < ViewComponent::Base
  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

115 entries across 115 versions & 1 rubygems

Version Path
avo-2.53.0 app/components/avo/profile_item_component.rb
avo-2.52.0 app/components/avo/profile_item_component.rb
avo-3.9.2 app/components/avo/profile_item_component.rb
avo-3.9.1 app/components/avo/profile_item_component.rb
avo-3.8.2 app/components/avo/profile_item_component.rb
avo-3.9.0 app/components/avo/profile_item_component.rb
avo-3.8.1 app/components/avo/profile_item_component.rb
avo-3.8.0 app/components/avo/profile_item_component.rb
avo-3.6.4 app/components/avo/profile_item_component.rb
avo-3.6.3 app/components/avo/profile_item_component.rb
avo-3.6.2 app/components/avo/profile_item_component.rb
avo-2.49.0 app/components/avo/profile_item_component.rb
avo-3.6.1 app/components/avo/profile_item_component.rb
avo-3.6.0 app/components/avo/profile_item_component.rb
avo-3.5.8 app/components/avo/profile_item_component.rb
avo-3.5.7 app/components/avo/profile_item_component.rb
avo-3.5.6 app/components/avo/profile_item_component.rb
avo-3.5.6.beta1 app/components/avo/profile_item_component.rb
avo-3.5.5 app/components/avo/profile_item_component.rb
avo-3.5.4 app/components/avo/profile_item_component.rb