Class: DefinitionComponentPreview
- Inherits:
-
ViewComponent::Preview
- Object
- ViewComponent::Preview
- DefinitionComponentPreview
- Defined in:
- lib/alveole/previews/definition_component_preview.rb
Defined Under Namespace
Classes: TempObj
Instance Method Summary collapse
Instance Method Details
#default ⇒ Object
14 15 16 17 |
# File 'lib/alveole/previews/definition_component_preview.rb', line 14 def default temp_obj = TempObj.new render(DefinitionComponent.new(label: nil, value: nil, obj: temp_obj, fieldname: :fieldname, options: {})) end |
#with_label ⇒ Object
19 20 21 22 |
# File 'lib/alveole/previews/definition_component_preview.rb', line 19 def with_label temp_obj = TempObj.new render(DefinitionComponent.new(label: 'custom label', value: nil, obj: temp_obj, fieldname: :fieldname, options: {})) end |
#with_options ⇒ Object
29 30 31 32 |
# File 'lib/alveole/previews/definition_component_preview.rb', line 29 def temp_obj = TempObj.new render(DefinitionComponent.new(label: nil, value: nil, obj: temp_obj, fieldname: :fieldname, options: { style: 'color:red' })) end |
#with_value ⇒ Object
24 25 26 27 |
# File 'lib/alveole/previews/definition_component_preview.rb', line 24 def with_value temp_obj = TempObj.new render(DefinitionComponent.new(label: nil, value: 'custom value', obj: temp_obj, fieldname: :fieldname, options: {})) end |