Sha256: c75700b08c370b046ef2c22d7cd95039ed72fd12e20cda9e819b03a1ad2948f4

Contents?: true

Size: 755 Bytes

Versions: 97

Compression:

Stored size: 755 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbTextarea
    class Textarea
      include Playbook::Props

      partial "pb_textarea/textarea"

      prop :error
      prop :object
      prop :label
      prop :method
      prop :name
      prop :placeholder
      prop :resize, type: Playbook::Props::Enum,
            values: %w[none both horizontal vertical],
            default: "none"
      prop :rows, type: Playbook::Props::Number,
            default: 4
      prop :value

      def classname
        generate_classname("pb_textarea_kit") + error_class + resize_class
      end

    private

      def error_class
        error ? " error" : ""
      end

      def resize_class
        " resize_#{resize}"
      end

    end
  end
end

Version data entries

97 entries across 97 versions & 1 rubygems

Version Path
playbook_ui-7.11.1 app/pb_kits/playbook/pb_textarea/textarea.rb
playbook_ui-7.11.0 app/pb_kits/playbook/pb_textarea/textarea.rb
playbook_ui-7.11.0.pre.alpha1 app/pb_kits/playbook/pb_textarea/textarea.rb
playbook_ui-7.10.0 app/pb_kits/playbook/pb_textarea/textarea.rb
playbook_ui-7.9.0 app/pb_kits/playbook/pb_textarea/textarea.rb
playbook_ui-7.8.4 app/pb_kits/playbook/pb_textarea/textarea.rb
playbook_ui-7.8.3 app/pb_kits/playbook/pb_textarea/textarea.rb
playbook_ui-7.8.2 app/pb_kits/playbook/pb_textarea/textarea.rb
playbook_ui-7.8.1 app/pb_kits/playbook/pb_textarea/textarea.rb
playbook_ui-7.8.0 app/pb_kits/playbook/pb_textarea/textarea.rb
playbook_ui-7.7.0.pre.alpha1 app/pb_kits/playbook/pb_textarea/textarea.rb
playbook_ui-7.7.0 app/pb_kits/playbook/pb_textarea/textarea.rb
playbook_ui-7.6.2.pre.alpha1 app/pb_kits/playbook/pb_textarea/textarea.rb
playbook_ui-7.6.2 app/pb_kits/playbook/pb_textarea/textarea.rb
playbook_ui-7.6.1.pre.alpha1 app/pb_kits/playbook/pb_textarea/textarea.rb
playbook_ui-7.6.1 app/pb_kits/playbook/pb_textarea/textarea.rb
playbook_ui-7.6.0 app/pb_kits/playbook/pb_textarea/textarea.rb
playbook_ui-7.5.1 app/pb_kits/playbook/pb_textarea/textarea.rb
playbook_ui-7.5.0 app/pb_kits/playbook/pb_textarea/textarea.rb
playbook_ui-7.4.2 app/pb_kits/playbook/pb_textarea/textarea.rb