Sha256: fd740b056044f31b0481731f972e6a8102bbecf728c9523222e9c57dbcccf237

Contents?: true

Size: 678 Bytes

Versions: 78

Compression:

Stored size: 678 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbTitle
    class Title
      include Playbook::Props

      partial "pb_title/title"

      prop :dark, type: Playbook::Props::Boolean,
                  default: false
      prop :size, type: Playbook::Props::Enum,
                  values: [1, 2, 3, 4],
                  default: 3
      prop :tag, type: Playbook::Props::Enum,
                 values: %w[h1 h2 h3 h4 h5 h6 p div span],
                 default: "h3"
      prop :text

      def classname
        generate_classname("pb_title_kit", size, dark_class)
      end

    private

      def dark_class
        dark ? "dark" : nil
      end
    end
  end
end

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
playbook_ui-4.11.0.pre.alpha3 app/pb_kits/playbook/pb_title/title.rb
playbook_ui-4.11.0.pre.alpha.pre.2 app/pb_kits/playbook/pb_title/title.rb
playbook_ui-4.10.0 app/pb_kits/playbook/pb_title/title.rb
playbook_ui-4.10.0.pre.alpha1 app/pb_kits/playbook/pb_title/title.rb
playbook_ui-4.9.0.pre.alpha1 app/pb_kits/playbook/pb_title/title.rb
playbook_ui-4.9.0 app/pb_kits/playbook/pb_title/title.rb
playbook_ui-4.8.2 app/pb_kits/playbook/pb_title/title.rb
playbook_ui-4.8.1 app/pb_kits/playbook/pb_title/title.rb
playbook_ui-4.7.1 app/pb_kits/playbook/pb_title/title.rb
playbook_ui-4.7.0 app/pb_kits/playbook/pb_title/title.rb
playbook_ui-4.6.1 app/pb_kits/playbook/pb_title/title.rb
playbook_ui-4.6.0 app/pb_kits/playbook/pb_title/title.rb
playbook_ui-4.5.2 app/pb_kits/playbook/pb_title/title.rb
playbook_ui-4.5.1 app/pb_kits/playbook/pb_title/title.rb
playbook_ui-4.5.0 app/pb_kits/playbook/pb_title/title.rb
playbook_ui-4.4.1 app/pb_kits/playbook/pb_title/title.rb
playbook_ui-4.4.0 app/pb_kits/playbook/pb_title/title.rb
playbook_ui-4.3.1 app/pb_kits/playbook/pb_title/title.rb
playbook_ui-4.3.0 app/pb_kits/playbook/pb_title/title.rb
playbook_ui-4.2.0 app/pb_kits/playbook/pb_title/title.rb