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-11.0.0.pre.alpha.2 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-11.0.0.pre.alpha.1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.26.1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.27.0.pre.lazysizes1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.27.0.pre.datepicker1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.26.0 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.26.0.pre.alpha5 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.26.0.pre.rc1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.26.0.pre.alpha.sticky1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.26.0.pre.alpha.display1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.26.0.pre.alpha3 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.25.1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.26.0.pre.alpha1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.25.0 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.25.0.pre.alpha3 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.25.0.pre.treeshaking1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.24.0 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.24.0.pre.alpha1 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.23.0 app/pb_kits/playbook/pb_hashtag/hashtag.rb
playbook_ui-10.23.0.pre.alpha2 app/pb_kits/playbook/pb_hashtag/hashtag.rb