Sha256: bcca0c13aa3427b8cb9622ce0f81629c0ad1bb7caa8498cdea37b580c7b07c25
Contents?: true
Size: 1.07 KB
Versions: 16
Compression:
Stored size: 1.07 KB
Contents
# frozen_string_literal: true module Playbook module PbFilter class Filter include Playbook::Props partial "pb_filter/filter" prop :filters, type: Playbook::Props::HashArray, default: [{name: ''}] prop :sort_menu, type: Playbook::Props::HashArray, default: [{}] prop :results, type: Playbook::Props::Numeric prop :template, type: Playbook::Props::Enum, values: %w[default single filter_only sort_only], default: "default" prop :background, type: Playbook::Props::Boolean, default: true prop :min_width, default: "auto" def classname generate_classname("pb_filter_kit") end def result_text case results when 1 "#{results} Result" when nil nil else "#{results} Results" end end def sort_icon(direction) case direction when "asc" "sort-amount-up" when "desc" "sort-amount-down" else "" end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems