Class: TableHeaderComponentPreview

Inherits:
ViewComponent::Preview
  • Object
show all
Defined in:
lib/alveole/previews/table_header_component_preview.rb

Defined Under Namespace

Classes: TempObj

Instance Method Summary collapse

Instance Method Details

#defaultObject



14
15
16
17
# File 'lib/alveole/previews/table_header_component_preview.rb', line 14

def default
  temp_obj = TempObj.new
  render(TableHeaderComponent.new(label: nil, url: nil, obj: temp_obj, fieldname: :fieldname))
end

#with_custom_labelObject



24
25
26
# File 'lib/alveole/previews/table_header_component_preview.rb', line 24

def with_custom_label
  render(TableHeaderComponent.new(label: 'Custom label', url: nil, obj: nil, fieldname: nil))
end

#with_urlObject



19
20
21
22
# File 'lib/alveole/previews/table_header_component_preview.rb', line 19

def with_url
  temp_obj = TempObj.new
  render(TableHeaderComponent.new(label: nil, url: 'example/url', obj: temp_obj, fieldname: :fieldname))
end