akkounts/app/components/app_info_component.rb
Râu Cao e4242333d9
All checks were successful
continuous-integration/drone/push Build is passing
Add recommended apps for Chat/XMPP
2023-08-08 19:59:29 +02:00

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