Sha256: 0efabd04190dcf913e66c5d97d936d752158b17053ec25dede532ea354e8b387

Contents?: true

Size: 736 Bytes

Versions: 190

Compression:

Stored size: 736 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbDetail
    class Detail < Playbook::KitBase
      prop :bold, type: Playbook::Props::Boolean,
                  default: false
      prop :color, type: Playbook::Props::Enum,
                   values: %w[light default lighter link error success],
                   default: "light"
      prop :tag, type: Playbook::Props::Enum,
                 values: %w[h1 h2 h3 h4 h5 h6 p span div],
                 default: "div"
      prop :text

      def classname
        generate_classname("pb_detail_kit", color) + is_bold
      end

      def content
        super.presence || text
      end

    private

      def is_bold
        bold ? " bold" : ""
      end
    end
  end
end

Version data entries

190 entries across 190 versions & 1 rubygems

Version Path
playbook_ui-13.14.0.pre.alpha.play1106filter1751 app/pb_kits/playbook/pb_detail/detail.rb
playbook_ui-13.14.0.pre.alpha.play1106filter1748 app/pb_kits/playbook/pb_detail/detail.rb
playbook_ui-13.14.0 app/pb_kits/playbook/pb_detail/detail.rb
playbook_ui-13.13.0.pre.alpha.PLAY1097linterenhancedelement1728 app/pb_kits/playbook/pb_detail/detail.rb
playbook_ui-13.13.0.pre.alpha.play10821727 app/pb_kits/playbook/pb_detail/detail.rb
playbook_ui-13.13.0.pre.alpha.play10821726 app/pb_kits/playbook/pb_detail/detail.rb
playbook_ui-13.13.0.pre.alpha.play10221678 app/pb_kits/playbook/pb_detail/detail.rb
playbook_ui-13.13.0.pre.alpha.PLAY1090csstokens1675 app/pb_kits/playbook/pb_detail/detail.rb
playbook_ui-13.13.0.pre.alpha.play900startratingasinput1657 app/pb_kits/playbook/pb_detail/detail.rb
playbook_ui-13.13.0 app/pb_kits/playbook/pb_detail/detail.rb
playbook_ui-13.12.0.pre.alpha.PLAY880cardkithighlightzindex1655 app/pb_kits/playbook/pb_detail/detail.rb
playbook_ui-13.12.0.pre.alpha.PLAY1081exportingtypes1627 app/pb_kits/playbook/pb_detail/detail.rb
playbook_ui-13.12.0.pre.alpha.PLAY1081exportingtypes1626 app/pb_kits/playbook/pb_detail/detail.rb
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1624 app/pb_kits/playbook/pb_detail/detail.rb
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1623 app/pb_kits/playbook/pb_detail/detail.rb
playbook_ui-13.12.0.pre.alpha.play900startratingasinput1612 app/pb_kits/playbook/pb_detail/detail.rb
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1611 app/pb_kits/playbook/pb_detail/detail.rb
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1609 app/pb_kits/playbook/pb_detail/detail.rb
playbook_ui-13.12.0.pre.alpha.PLAY1081exporttypes1608 app/pb_kits/playbook/pb_detail/detail.rb
playbook_ui-13.12.0.pre.alpha.play10281596 app/pb_kits/playbook/pb_detail/detail.rb