Class: ShadcnPhlexcomponents::Pagination
- Inherits:
-
Base
- Object
- Phlex::HTML
- Base
- ShadcnPhlexcomponents::Pagination
show all
- Defined in:
- lib/shadcn_phlexcomponents/components/pagination.rb
Constant Summary
Constants inherited
from Base
Base::SANITIZER_ALLOWED_ATTRIBUTES, Base::SANITIZER_ALLOWED_TAGS, Base::TAILWIND_MERGER
Instance Method Summary
collapse
Methods inherited from Base
#before_template, #convert_collection_hash_to_struct, #find_as_child, #icon, #initialize, #item_disabled?, #merge_default_attributes, #merged_as_child_attributes, #nokogiri_attributes_to_hash, #overlay, #sanitize_as_child
Instance Method Details
#default_attributes ⇒ Object
34
35
36
37
38
39
40
41
|
# File 'lib/shadcn_phlexcomponents/components/pagination.rb', line 34
def default_attributes
{
role: "navigation",
aria: {
label: "navigation",
},
}
end
|
#ellipsis(**attributes) ⇒ Object
30
31
32
|
# File 'lib/shadcn_phlexcomponents/components/pagination.rb', line 30
def ellipsis(**attributes, &)
(**attributes, &)
end
|
#item(**attributes) ⇒ Object
14
15
16
|
# File 'lib/shadcn_phlexcomponents/components/pagination.rb', line 14
def item(**attributes, &)
(**attributes, &)
end
|
#link(name = nil, options = nil, html_options = nil) ⇒ Object
18
19
20
|
# File 'lib/shadcn_phlexcomponents/components/pagination.rb', line 18
def link(name = nil, options = nil, html_options = nil, &)
(name, options, html_options, &)
end
|
#next(options = nil, html_options = nil) ⇒ Object
26
27
28
|
# File 'lib/shadcn_phlexcomponents/components/pagination.rb', line 26
def next(options = nil, html_options = nil)
(options, html_options)
end
|
#previous(options = nil, html_options = nil) ⇒ Object
22
23
24
|
# File 'lib/shadcn_phlexcomponents/components/pagination.rb', line 22
def previous(options = nil, html_options = nil)
(options, html_options)
end
|
#view_template ⇒ Object
43
44
45
46
47
|
# File 'lib/shadcn_phlexcomponents/components/pagination.rb', line 43
def view_template(&)
div(**@attributes) do
ul(class: "flex flex-row items-center gap-1", &)
end
end
|