Class: GovukComponent::PaginationComponent::NextPage
- Inherits:
-
AdjacentPage
- Object
- ViewComponent::Base
- Base
- AdjacentPage
- GovukComponent::PaginationComponent::NextPage
- Defined in:
- app/components/govuk_component/pagination_component/next_page.rb
Instance Attribute Summary
Attributes inherited from AdjacentPage
#block_mode, #href, #label_text, #suffix, #text, #visually_hidden_text
Attributes inherited from Base
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(href:, text:, label_text: nil, block_mode: true, classes: [], html_attributes: {}) ⇒ NextPage
constructor
A new instance of NextPage.
Methods inherited from AdjacentPage
Methods inherited from Base
Constructor Details
#initialize(href:, text:, label_text: nil, block_mode: true, classes: [], html_attributes: {}) ⇒ NextPage
Returns a new instance of NextPage.
2 3 4 5 6 7 8 9 10 11 12 |
# File 'app/components/govuk_component/pagination_component/next_page.rb', line 2 def initialize(href:, text:, label_text: nil, block_mode: true, classes: [], html_attributes: {}) super( suffix: "next", text:, href:, label_text:, block_mode:, classes:, html_attributes: ) end |
Instance Method Details
#body ⇒ Object
14 15 16 17 18 |
# File 'app/components/govuk_component/pagination_component/next_page.rb', line 14 def body return [arrow, title_span] if block_mode? [title_span, arrow] end |