Sha256: 187c19465a1a04ac80bc0e773b346189d0a7de53c5cc2ea143b369bead89d19c
Contents?: true
Size: 935 Bytes
Versions: 16
Compression:
Stored size: 935 Bytes
Contents
# frozen_string_literal: true module Playbook module PbLabelValue class LabelValue include Playbook::Props partial "pb_label_value/label_value" prop :label, required: true prop :value prop :dark, type: Playbook::Props::Boolean, default: false prop :variant, type: Playbook::Props::Enum, values: %w[default details], default: "default" prop :icon prop :description prop :title prop :date prop :active, type: Playbook::Props::Boolean, default: false def classname generate_classname("pb_label_value_kit", variant_class, dark_class) end def date_element "· #{date.strftime('%m/%d')}".html_safe end private def dark_class dark ? "dark" : nil end def variant_class variant == "details" ? "details" : nil end end end end
Version data entries
16 entries across 16 versions & 1 rubygems