Class: PageComponentPreview
- Inherits:
-
ViewComponent::Preview
- Object
- ViewComponent::Preview
- PageComponentPreview
- Defined in:
- lib/alveole/previews/page_component_preview.rb
Instance Method Summary collapse
Instance Method Details
#default ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/alveole/previews/page_component_preview.rb', line 4 def default render(PageComponent.new) do |page| page.actions do tag.span('Example actions') end page.header do tag.span('Example header') end tag.span('Example content') end end |
#without_actions ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/alveole/previews/page_component_preview.rb', line 16 def without_actions render(PageComponent.new) do |page| page.header do tag.span('Example header') end tag.span('Example content') end end |
#without_header ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/alveole/previews/page_component_preview.rb', line 25 def without_header render(PageComponent.new) do |page| page.actions do tag.span('Example actions') end tag.span('Example content') end end |