Class: CCS::Components::GovUK::Pagination::Item::Form
- Inherits:
-
CCS::Components::GovUK::Pagination::Item
- Object
- Base
- CCS::Components::GovUK::Pagination::Item
- CCS::Components::GovUK::Pagination::Item::Form
- Defined in:
- lib/ccs/components/govuk/pagination/item/form.rb
Overview
GOV.UK Pagination Item form
This generates the HTML for the pagination item using a button tag
Constant Summary
Constants inherited from CCS::Components::GovUK::Pagination::Item
Constants inherited from Base
Instance Method Summary collapse
-
#initialize(form:, **options) ⇒ Form
constructor
A new instance of Form.
-
#render ⇒ ActiveSupport::SafeBuffer
Generates the HTML for the GOV.UK Pagination item button.
Constructor Details
#initialize(form:, **options) ⇒ Form
Returns a new instance of Form.
27 28 29 30 31 32 33 |
# File 'lib/ccs/components/govuk/pagination/item/form.rb', line 27 def initialize(form:, **) super(**) @options[:attributes][:class] << ' pagination-number--button_as_link' @form = form end |
Instance Method Details
#render ⇒ ActiveSupport::SafeBuffer
Generates the HTML for the GOV.UK Pagination item button
39 40 41 42 43 |
# File 'lib/ccs/components/govuk/pagination/item/form.rb', line 39 def render super do form.(number, **@options[:attributes]) end end |