Class: Shadcn::PaginationItemComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Shadcn::PaginationItemComponent
- Defined in:
- app/components/shadcn/pagination_item_component.rb
Overview
Pagination Item component - wrapper for links
Constant Summary collapse
- LINK_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 w-9"- ACTIVE_CLASSES =
"border border-input bg-background shadow-sm"
Instance Attribute Summary
Attributes inherited from BaseComponent
#class_name, #data, #html_options
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(href: nil, active: false, disabled: false, **options) ⇒ PaginationItemComponent
constructor
A new instance of PaginationItemComponent.
Methods inherited from BaseComponent
Methods included from Rails::Helpers::ClassNameHelper
Constructor Details
#initialize(href: nil, active: false, disabled: false, **options) ⇒ PaginationItemComponent
Returns a new instance of PaginationItemComponent.
9 10 11 12 13 14 |
# File 'app/components/shadcn/pagination_item_component.rb', line 9 def initialize(href: nil, active: false, disabled: false, **) super(**) @href = href @active = active @disabled = disabled end |
Instance Method Details
#call ⇒ Object
16 17 18 19 20 |
# File 'app/components/shadcn/pagination_item_component.rb', line 16 def call content_tag(:li) do link_element end end |