20 lines
543 B
Ruby
20 lines
543 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AppInfoComponent < ViewComponent::Base
|
|
def initialize(name:, description:, icon_path: , icon_fill_box: false, links: [])
|
|
@name = name
|
|
@description = description
|
|
@icon_path = icon_path
|
|
@icon_container_class = icon_container_class(icon_fill_box)
|
|
@links = links
|
|
end
|
|
|
|
def icon_container_class(icon_fill_box)
|
|
str = "flex-0 h-16 w-16 sm:h-28 sm:w-28 bg-white rounded-3xl overflow-hidden"
|
|
unless icon_fill_box
|
|
str += " p-2 border border-gray-200"
|
|
end
|
|
str
|
|
end
|
|
end
|