Sha256: e3b0d8ea6157436d29411f64ae9dccfd3f7a21ef2f07349212ccf07c476d99b6
Contents?: true
Size: 678 Bytes
Versions: 8
Compression:
Stored size: 678 Bytes
Contents
module Spina module MediaPicker class ModalComponent < ApplicationComponent def initialize(target, images:, media_folder: nil) @target = target @images = images @media_folder = media_folder end def media_folders @media_folders ||= Spina::MediaFolder.order(:name) end def image_count @image_count ||= Spina::Image.count end def media_folder_classes(media_folder) if media_folder == @media_folder "text-gray-900 bg-spina-dark bg-opacity-20" else "text-gray-600 hover:bg-gray-200 bg-opacity-100 hover:bg-gray-200" end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems