module Coco 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