Sha256: 7d099088e0a0ccfb002b398edaaf99e67fc2521709b04ae36e937bb495d99112

Contents?: true

Size: 686 Bytes

Versions: 1

Compression:

Stored size: 686 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbCaption
    class Caption
      include Playbook::Props

      partial "pb_caption/caption"

      prop :dark, type: Playbook::Props::Boolean, default: false
      prop :size, type: Playbook::Props::Enum,
                  values: %w[xs sm md base lg xl],
                  default: "md"
      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_caption_kit", size, dark_class)
      end

    private


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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
playbook_ui-2.9.8 app/pb_kits/playbook/pb_caption/caption.rb