Class: Voom::Presenters::DSL::Components::TextArea

Inherits:
TextField show all
Defined in:
lib/voom/presenters/dsl/components/text_area.rb

Instance Attribute Summary collapse

Attributes inherited from TextField

#full_width, #password, #required

Attributes inherited from Input

#name

Attributes inherited from EventBase

#event_parent_id

Attributes included from Mixins::Event

#events

Attributes inherited from Base

#attributes, #context, #id, #type

Instance Method Summary collapse

Methods inherited from TextField

#error, #hint, #icon, #label, #pattern, #readonly, #value

Methods included from Mixins::Event

#event

Methods inherited from Base

#expand!

Methods included from Serializer

#to_hash

Methods included from Lockable

#lock!, #locked?

Constructor Details

#initialize(**attribs_, &block) ⇒ TextArea

Returns a new instance of TextArea.



10
11
12
13
14
# File 'lib/voom/presenters/dsl/components/text_area.rb', line 10

def initialize(**attribs_, &block)
  super(type: :text_area, **attribs_, &block)
  @rows = attribs.delete(:rows) || 3
  expand!
end

Instance Attribute Details

#rowsObject (readonly)

Returns the value of attribute rows.



8
9
10
# File 'lib/voom/presenters/dsl/components/text_area.rb', line 8

def rows
  @rows
end