Sha256: 0e98fab4eb4843cff7cacc2e5204d0ea3077e7ed4a62c83065af73e9256acca3

Contents?: true

Size: 662 Bytes

Versions: 183

Compression:

Stored size: 662 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbHashtag
    class Hashtag < Playbook::KitBase
      prop :text
      prop :type, type: Playbook::Props::Enum,
                  values: %w[default project home appointment],
                  default: "default"
      prop :url

      def classname
        generate_classname("pb_hastag_kit")
      end

      def hashtag_text
        type_text + text
      end

    private

      def type_text
        if type === "home"
          "H#"
        elsif type === "project"
          "P#"
        elsif type === "appointment"
          "A#"
        else
          "#"
        end
      end
    end
  end
end

Version data entries

183 entries across 183 versions & 1 rubygems

Version Path
playbook_ui-10.23.0.pre.cachetest app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.23.0.pre.alpha1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.22.1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.22.0 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.21.1.pre.alpha1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.21.0.pre.alpha.lightbox.2 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.21.0 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.21.0.pre.alpha.lightbox app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.21.0.pre.alpha.rg1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.21.0.pre.alpha.jg1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.21.0.pre.alpha.na1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.21.0.pre.alpha.jd1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.20.0 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.19.0 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.19.0.pre.lightbox app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.18.2 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.19.0.pre.popover.alpha1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.18.1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.18.0 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.17.0 app/pb_kits/playbook/pb_hashtag/hashtag.rb