Class: ToolbarComponentPreview

Inherits:
ViewComponent::Preview
  • Object
show all
Defined in:
lib/alveole/previews/toolbar_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/toolbar_component_preview.rb', line 4

def default
  render(ToolbarComponent.new) do |toolbar|
    toolbar.left do
      tag.span('Example left')
    end
    toolbar.right do
      tag.span('Example right')
    end
    tag.span('Example content')
  end
end

#without_leftObject



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

def without_left
  render(ToolbarComponent.new) do |toolbar|
    toolbar.right do
      tag.span('Example right')
    end
    tag.span('Example content')
  end
end

#without_rightObject



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

def without_right
  render(ToolbarComponent.new) do |toolbar|
    toolbar.left do
      tag.span('Example left')
    end
    tag.span('Example content')
  end
end