Class: Shadcn::PaginationNextComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/shadcn/pagination_next_component.rb

Overview

Pagination Next button

Constant Summary collapse

BASE_CLASSES =
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2 gap-1 pr-2.5"

Instance Attribute Summary

Attributes inherited from BaseComponent

#class_name, #data, #html_options

Instance Method Summary collapse

Methods inherited from BaseComponent

#content

Methods included from Rails::Helpers::ClassNameHelper

#cn

Constructor Details

#initialize(href: nil, disabled: false, **options) ⇒ PaginationNextComponent

Returns a new instance of PaginationNextComponent.



8
9
10
11
12
# File 'app/components/shadcn/pagination_next_component.rb', line 8

def initialize(href: nil, disabled: false, **options)
  super(**options)
  @href = href
  @disabled = disabled
end

Instance Method Details

#callObject



14
15
16
17
18
# File 'app/components/shadcn/pagination_next_component.rb', line 14

def call
  (:li) do
    link_content
  end
end