class UiBibz::Ui::Core::Navigations::PaginationLink

Create a PageLink

This element is an extend of UiBibz::Ui::Core::Navigations::Component.

You can add HTML attributes using the html_options. You can pass arguments in options attribute:

UiBibz::Ui::Core::Navigations::PageLink.new(content, options = nil, html_options = nil)

UiBibz::Ui::Core::Navigations::PageLink.new(options = nil, html_options = nil) do
  content
end
UiBibz::Ui::Core::Navigations::PageLink.new(content, { badge: 15, url: '/', state: :active, link_html_options: { class: 'link1' }},{ class: 'test' }).render

UiBibz::Ui::Core::Navigations::PageLink.new({glyph: { name: 'eye', size: 3 }, { class: 'test' }) do
  'Home'
end.render

Public Instance Methods

pre_render() click to toggle source

Render html tag

# File lib/ui_bibz/ui/core/navigations/components/pagination_link.rb, line 44
def pre_render
  content_tag :li, html_options do
    link_to content, options[:url], class: 'page-link'
  end
end

Private Instance Methods

component_html_classes() click to toggle source
# File lib/ui_bibz/ui/core/navigations/components/pagination_link.rb, line 52
def component_html_classes
  'page-item'
end