Sha256: c151482b792e63936a3b90e3cd4ba888d254c544aa055962dc9c2632bfdc0190

Contents?: true

Size: 1.31 KB

Versions: 980

Compression:

Stored size: 1.31 KB

Contents

# frozen_string_literal: true

module Playbook
  module PbRichTextEditor
    class RichTextEditor < Playbook::KitBase
      prop :focus, type: Playbook::Props::Boolean,
                   default: false

      prop :inline, type: Playbook::Props::Boolean,
                    default: false

      prop :simple, type: Playbook::Props::Boolean,
                    default: false

      prop :sticky, type: Playbook::Props::Boolean,
                    default: false
      prop :toolbar_bottom, type: Playbook::Props::Boolean,
                            default: false

      prop :value
      prop :template
      prop :placeholder

      def classname
        generate_classname("pb_rich_text_editor_kit", simple_class, focus_class, sticky_class, separator: " ")
      end

      def focus_class
        focus ? "focus-editor-targets" : nil
      end

      def simple_class
        simple ? "simple" : nil
      end

      def sticky_class
        sticky ? "sticky" : nil
      end

      def rich_text_options
        {
          id: id,
          inline: inline,
          className: classname,
          focus: focus,
          simple: simple,
          sticky: sticky,
          toolbarBottom: toolbar_bottom,
          value: value,
          template: template,
          placeholder: placeholder,
        }
      end
    end
  end
end

Version data entries

980 entries across 980 versions & 1 rubygems

Version Path
playbook_ui-14.8.0.pre.alpha.PLAY1649rolloutheightglobalprops4635 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
playbook_ui-14.9.0.pre.rc.8 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
playbook_ui-14.8.0.pre.alpha.PLAY1598floatinguiupgrade4617 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
playbook_ui-14.9.0.pre.rc.7 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
playbook_ui-14.9.0.pre.rc.6 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
playbook_ui-14.9.0.pre.rc.5 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
playbook_ui-14.8.0.pre.alpha.pbntr661createstickyleftprop4612 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
playbook_ui-14.8.0.pre.alpha.play1648heightglobalprops4606 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
playbook_ui-14.9.0.pre.rc.4 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
playbook_ui-14.9.0.pre.rc.3 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
playbook_ui-14.9.0.pre.rc.2 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
playbook_ui-14.8.0.pre.alpha.revert3916revert3893PBNTR667railstypeaheadformintegration4567 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
playbook_ui-14.8.0.pre.alpha.revert3916revert3893PBNTR667railstypeaheadformintegration4565 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
playbook_ui-14.8.0.pre.alpha.PLAY1598floatinguiupgrade4563 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
playbook_ui-14.8.0.pre.alpha.play1648heightglobalprops4559 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
playbook_ui-14.9.0.pre.rc.1 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
playbook_ui-14.8.0.pre.alpha.PLAY16254545 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
playbook_ui-14.8.0.pre.alpha.PLAY1615movenegativetoleftofcurrencysign4543 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
playbook_ui-14.8.0.pre.alpha.PLAY1615movenegativetoleftofcurrencysign4539 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
playbook_ui-14.9.0.pre.rc.0 app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb