Class: Fluxbit::BottomNavigationComponent::Pagination
- Inherits:
-
Component
- Object
- ViewComponent::Base
- Component
- Fluxbit::BottomNavigationComponent::Pagination
- Includes:
- Config::BottomNavigationComponent
- Defined in:
- app/components/fluxbit/bottom_navigation_component.rb
Overview
Pagination component for bottom navigation
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(**props, &block) ⇒ Pagination
constructor
Initializes the pagination component.
Methods inherited from Component
#add, #add_popover_or_tooltip, #anyicon, #element_name, #fx_id, #icon, #options, #popover?, #random_id, #remove_class, #remove_class_from_props, #render_popover_or_tooltip, #target, #tooltip?
Methods included from IconHelpers
#chevron_double_left, #chevron_double_right, #chevron_down, #chevron_left, #chevron_right, #chevron_up, #close_icon, #ellipsis_horizontal, #eye_icon, #eye_slash_icon, #plus_icon
Constructor Details
#initialize(**props, &block) ⇒ Pagination
Initializes the pagination component.
299 300 301 302 303 304 305 306 307 308 309 310 |
# File 'app/components/fluxbit/bottom_navigation_component.rb', line 299 def initialize(**props, &block) super(**props, &block) @props = props @parent_config = @props.delete(:parent_config) @current_page = @props.delete(:current_page) || 1 @total_pages = @props.delete(:total_pages) || 1 @previous_href = @props.delete(:previous_href) || "#" @next_href = @props.delete(:next_href) || "#" @previous_label = @props.delete(:previous_label) || "Previous" @next_label = @props.delete(:next_label) || "Next" end |
Instance Method Details
#call ⇒ Object
312 313 314 315 316 317 318 319 320 |
# File 'app/components/fluxbit/bottom_navigation_component.rb', line 312 def call tag.div(class: styles[:pagination][:container]) do safe_join([ , render_page_info, ]) end end |