Sha256: 7d2c47c1e4aca93b15d691d03c49ce08d08a2a8a75531796ff2885de26489e7d

Contents?: true

Size: 676 Bytes

Versions: 1

Compression:

Stored size: 676 Bytes

Contents

class SidebarComponentPreview < ViewComponent::Preview
  layout false

  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

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
alveole-0.0.1 lib/alveole/previews/sidebar_component_preview.rb