Sha256: d199013c0117cc774a32f30ccd831905ec35ce8438b135043b8494c7a4c1ca7b

Contents?: true

Size: 702 Bytes

Versions: 47

Compression:

Stored size: 702 Bytes

Contents

module Coco
  module App
    module Elements
      class SeamlessTextarea < Coco::Component
        include TagHelper
        include Concerns::AcceptsOptions

        accepts_option :multiline, from: [true, false]
        accepts_option :focus, from: [true, false]

        attr_reader :placeholder

        def initialize(textarea: nil, value: nil, placeholder: nil, **kwargs)
          @textarea_args = textarea.to_h
          @value = value
          @placeholder = placeholder
        end

        def multiline?
          get_option_value(:multiline)
        end

        def value
          (@value.presence || content.presence || "").strip_heredoc.strip
        end
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
coveragebook_components-0.12.2 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb
coveragebook_components-0.12.1 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb
coveragebook_components-0.12.0 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb
coveragebook_components-0.11.0 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb
coveragebook_components-0.10.1.beta.2 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb
coveragebook_components-0.10.1.beta.1 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb
coveragebook_components-0.10.1.beta.0 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb
coveragebook_components-0.10.0 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb
coveragebook_components-0.9.1 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb
coveragebook_components-0.9.0 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb
coveragebook_components-0.8.9 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb
coveragebook_components-0.8.8 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb
coveragebook_components-0.8.7 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb
coveragebook_components-0.8.6 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb
coveragebook_components-0.8.5 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb
coveragebook_components-0.8.4 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb
coveragebook_components-0.8.3 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb
coveragebook_components-0.8.2 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb
coveragebook_components-0.8.1 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb
coveragebook_components-0.8.0 app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb