Class: Ui::Pagination::Component::NextItem
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Ui::Pagination::Component::NextItem
- Defined in:
- lib/uikit_rails/templates/components/pagination/component.rb
Instance Attribute Summary collapse
-
#disabled ⇒ Object
readonly
Returns the value of attribute disabled.
-
#href ⇒ Object
readonly
Returns the value of attribute href.
-
#html_attrs ⇒ Object
readonly
Returns the value of attribute html_attrs.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(href: "#", disabled: false, **html_attrs) ⇒ NextItem
constructor
A new instance of NextItem.
Constructor Details
#initialize(href: "#", disabled: false, **html_attrs) ⇒ NextItem
Returns a new instance of NextItem.
66 67 68 69 70 71 |
# File 'lib/uikit_rails/templates/components/pagination/component.rb', line 66 def initialize(href: "#", disabled: false, **html_attrs) @href = href @disabled = disabled @html_attrs = html_attrs super() end |
Instance Attribute Details
#disabled ⇒ Object (readonly)
Returns the value of attribute disabled.
64 65 66 |
# File 'lib/uikit_rails/templates/components/pagination/component.rb', line 64 def disabled @disabled end |
#href ⇒ Object (readonly)
Returns the value of attribute href.
64 65 66 |
# File 'lib/uikit_rails/templates/components/pagination/component.rb', line 64 def href @href end |
#html_attrs ⇒ Object (readonly)
Returns the value of attribute html_attrs.
64 65 66 |
# File 'lib/uikit_rails/templates/components/pagination/component.rb', line 64 def html_attrs @html_attrs end |
Instance Method Details
#call ⇒ Object
73 74 75 76 77 78 79 80 |
# File 'lib/uikit_rails/templates/components/pagination/component.rb', line 73 def call classes = class_names("ui-pagination__item ui-pagination__next", "ui-pagination__item--disabled": disabled) if disabled content_tag(:span, content.presence || "Next", class: classes, "aria-disabled": "true", **html_attrs) else content_tag(:a, content.presence || "Next", class: classes, href: href, **html_attrs) end end |