Sha256: d32c72b356a653c3c85d8c73844b476201f930ec005557c7fba26da0957d5685

Contents?: true

Size: 1.03 KB

Versions: 1

Compression:

Stored size: 1.03 KB

Contents

require 'action_view'

module CCS::Components
  module GovUK
    class StepByStepNavigation < Base
      class Section < Base
        class Content
          # = GOV.UK Step by step navigation section content paragraph
          #
          # Generates the paragraph HTML for the step by step navigation section content
          #
          # @!attribute [r] text
          #   @return [String] Text for the paragraph

          class Paragraph
            include ActionView::Context
            include ActionView::Helpers

            private

            attr_reader :text

            public

            # @param text [String] the text for the paragraph

            def initialize(text:)
              @text = text
            end

            # Generates the HTML for the GOV.UK Step by step navigation section content paragraph
            #
            # @return [ActiveSupport::SafeBuffer]

            def render
              tag.p(text, class: 'gem-c-step-nav__paragraph')
            end
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ccs-frontend_helpers-0.1.0.rc.2 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb