Class: SidebarComponentPreview

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

Instance Method Summary collapse

Instance Method Details

#defaultObject



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/alveole/previews/sidebar_component_preview.rb', line 4

def default
  render(SidebarComponent.new) do |sidebar|
    sidebar.top do
      tag.span('Example top')
    end
    sidebar.bottom do
      tag.span('Example bottom')
    end
    tag.span('Example content')
  end
end

#without_bottomObject



25
26
27
28
29
30
31
32
# File 'lib/alveole/previews/sidebar_component_preview.rb', line 25

def without_bottom
  render(SidebarComponent.new) do |sidebar|
    sidebar.top do
      tag.span('Example top')
    end
    tag.span('Example content')
  end
end

#without_topObject



16
17
18
19
20
21
22
23
# File 'lib/alveole/previews/sidebar_component_preview.rb', line 16

def without_top
  render(SidebarComponent.new) do |sidebar|
    sidebar.bottom do
      tag.span('Example bottom')
    end
    tag.span('Example content')
  end
end