Class: Playbook::PbTextInput::TextInput
- Inherits:
-
KitBase
- Object
- ViewComponent::Base
- KitBase
- Playbook::PbTextInput::TextInput
show all
- Defined in:
- app/pb_kits/playbook/pb_text_input/text_input.rb
Instance Method Summary
collapse
Methods inherited from KitBase
#object
Methods included from ZIndex
included
Methods included from Spacing
included, #max_width_options, #max_width_props, #max_width_values, #spacing_options, #spacing_props, #spacing_values
Methods included from Classnames
#generate_classname, #generate_classname_without_spacing, included
#initialize, #prop
#pb_rails
#pb_form_with
Instance Method Details
#classname ⇒ Object
21
22
23
|
# File 'app/pb_kits/playbook/pb_text_input/text_input.rb', line 21
def classname
generate_classname("pb_text_input_kit") + error_class
end
|
#validation_data ⇒ Object
33
34
35
36
37
|
# File 'app/pb_kits/playbook/pb_text_input/text_input.rb', line 33
def validation_data
fields = {}
fields[:message] = validation_message unless validation_message.blank?
fields
end
|
#validation_message ⇒ Object
25
26
27
|
# File 'app/pb_kits/playbook/pb_text_input/text_input.rb', line 25
def validation_message
validation[:message] || ""
end
|
#validation_pattern ⇒ Object
29
30
31
|
# File 'app/pb_kits/playbook/pb_text_input/text_input.rb', line 29
def validation_pattern
validation[:pattern] || nil
end
|