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

Version Path
playbook_ui-14.12.0.pre.alpha.play1790darkaudittable5802 app/pb_kits/playbook/pb_legend/legend.rb
playbook_ui-14.12.0.pre.alpha.play1752updatecontenttag5801 app/pb_kits/playbook/pb_legend/legend.rb
playbook_ui-14.13.0.pre.rc.6 app/pb_kits/playbook/pb_legend/legend.rb
playbook_ui-14.13.0.pre.rc.5 app/pb_kits/playbook/pb_legend/legend.rb
playbook_ui-14.12.0.pre.alpha.PLAY1602lightboxoverlapnitrobug5781 app/pb_kits/playbook/pb_legend/legend.rb
playbook_ui-14.13.0.pre.rc.4 app/pb_kits/playbook/pb_legend/legend.rb
playbook_ui-14.12.0.pre.alpha.playrailsinputmaskissue5775 app/pb_kits/playbook/pb_legend/legend.rb
playbook_ui-14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5757 app/pb_kits/playbook/pb_legend/legend.rb
playbook_ui-14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5754 app/pb_kits/playbook/pb_legend/legend.rb
playbook_ui-14.12.0.pre.alpha.PLAY1602lightboxoverlapnitrobugzindextoken5751 app/pb_kits/playbook/pb_legend/legend.rb
playbook_ui-14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5738 app/pb_kits/playbook/pb_legend/legend.rb
playbook_ui-14.13.0.pre.rc.3 app/pb_kits/playbook/pb_legend/legend.rb
playbook_ui-14.12.0.pre.alpha.PLAY1865reactdatepickerreinitializingbug5732 app/pb_kits/playbook/pb_legend/legend.rb
playbook_ui-14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5728 app/pb_kits/playbook/pb_legend/legend.rb
playbook_ui-14.12.0.pre.alpha.play1862buttondisabledlinkbug5716 app/pb_kits/playbook/pb_legend/legend.rb
playbook_ui-14.12.0.pre.alpha.play1862buttondisabledlinkbug5714 app/pb_kits/playbook/pb_legend/legend.rb
playbook_ui-14.13.0.pre.rc.2 app/pb_kits/playbook/pb_legend/legend.rb
playbook_ui-14.13.0.pre.rc.1 app/pb_kits/playbook/pb_legend/legend.rb
playbook_ui-14.13.0.pre.rc.0 app/pb_kits/playbook/pb_legend/legend.rb
playbook_ui-14.12.0.pre.alpha.advancedtablealignmentfixes5693 app/pb_kits/playbook/pb_legend/legend.rb