Sha256: 6d7e9c4ba5c8c56099a17873110ed95827098083d5cfef9932075ab6df51c80e
Contents?: true
Size: 679 Bytes
Versions: 1023
Compression:
Stored size: 679 Bytes
Contents
# frozen_string_literal: true module Playbook module PbLegend class Legend < Playbook::KitBase prop :color, type: Playbook::Props::String, default: "data_1" prop :prefix_text prop :text, required: true def body_color dark ? "lighter" : "light" end def custom_color color.start_with?("#") ? "background: #{color}" : "" end def custom_color_class color.start_with?("#") ? "pb_legend_indicator_circle_custom" : "pb_legend_indicator_circle" end def classname generate_classname("pb_legend_kit", color.start_with?("#") ? nil : color) end end end end
Version data entries
1,023 entries across 1,023 versions & 1 rubygems