Sha256: ce3e47402c32f297f05f70385902b7314ed9bb57d0dc44aff0b2236f19b5ba3e

Contents?: true

Size: 746 Bytes

Versions: 125

Compression:

Stored size: 746 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbTooltip
    class Tooltip
      include Playbook::Props
      partial "pb_tooltip/tooltip"

      prop :position
      prop :trigger_element_id
      prop :tooltip_id
      prop :dark, type: Playbook::Props::Boolean,
                          default: false

      def classname
        generate_classname("pb_tooltip_kit", dark_class)
      end

      def data
        Hash(values[:data]).merge(
          pb_tooltip_kit: true,
          pb_tooltip_position: position,
          pb_tooltip_trigger_element_id: trigger_element_id,
          pb_tooltip_tooltip_id: tooltip_id,
        )
      end

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

Version data entries

125 entries across 125 versions & 1 rubygems

Version Path
playbook_ui-7.4.0.pre.alpha6 app/pb_kits/playbook/pb_tooltip/tooltip.rb
playbook_ui-7.4.0.pre.alpha4 app/pb_kits/playbook/pb_tooltip/tooltip.rb
playbook_ui-7.4.0.pre.alpha2 app/pb_kits/playbook/pb_tooltip/tooltip.rb
playbook_ui-7.4.0.pre.alpha1 app/pb_kits/playbook/pb_tooltip/tooltip.rb
playbook_ui-7.3.0.pre.alpha12 app/pb_kits/playbook/pb_tooltip/tooltip.rb
playbook_ui-7.3.0.pre.alpha11 app/pb_kits/playbook/pb_tooltip/tooltip.rb
playbook_ui-7.3.0.pre.alpha10 app/pb_kits/playbook/pb_tooltip/tooltip.rb
playbook_ui-7.3.0.pre.alpha9 app/pb_kits/playbook/pb_tooltip/tooltip.rb
playbook_ui-7.3.0.pre.alpha8 app/pb_kits/playbook/pb_tooltip/tooltip.rb
playbook_ui-7.3.0.pre.alpha7 app/pb_kits/playbook/pb_tooltip/tooltip.rb
playbook_ui-7.3.0.pre.alpha6 app/pb_kits/playbook/pb_tooltip/tooltip.rb
playbook_ui-7.3.0.pre.alpha5 app/pb_kits/playbook/pb_tooltip/tooltip.rb
playbook_ui-7.3.0.pre.alpha4 app/pb_kits/playbook/pb_tooltip/tooltip.rb
playbook_ui-7.3.0.pre.alpha3 app/pb_kits/playbook/pb_tooltip/tooltip.rb
playbook_ui-7.3.0.pre.alpha2 app/pb_kits/playbook/pb_tooltip/tooltip.rb
playbook_ui-7.3.0.pre.alpha1 app/pb_kits/playbook/pb_tooltip/tooltip.rb
playbook_ui-7.2.0 app/pb_kits/playbook/pb_tooltip/tooltip.rb
playbook_ui-7.1.2 app/pb_kits/playbook/pb_tooltip/tooltip.rb
playbook_ui-7.1.0.pre.alpha2 app/pb_kits/playbook/pb_tooltip/tooltip.rb
playbook_ui-7.1.1.pre.alpha1 app/pb_kits/playbook/pb_tooltip/tooltip.rb