Class: UI::Textarea
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::Textarea
- Includes:
- TextareaBehavior
- Defined in:
- app/components/ui/textarea.rb
Instance Method Summary collapse
-
#initialize(placeholder: nil, value: "", name: nil, id: nil, rows: nil, classes: "", **attributes) ⇒ Textarea
constructor
A new instance of Textarea.
- #view_template ⇒ Object
Methods included from TextareaBehavior
#textarea_classes, #textarea_html_attributes
Constructor Details
#initialize(placeholder: nil, value: "", name: nil, id: nil, rows: nil, classes: "", **attributes) ⇒ Textarea
Returns a new instance of Textarea.
6 7 8 9 10 11 12 13 14 |
# File 'app/components/ui/textarea.rb', line 6 def initialize(placeholder: nil, value: "", name: nil, id: nil, rows: nil, classes: "", **attributes) @placeholder = placeholder @value = value @name = name @id = id @rows = rows @classes = classes @attributes = attributes end |
Instance Method Details
#view_template ⇒ Object
16 17 18 |
# File 'app/components/ui/textarea.rb', line 16 def view_template textarea(**textarea_html_attributes.deep_merge(@attributes)) { @value } end |