Sha256: 4400f83ebdde829c75405b3005c8460bd334c80cbba9d2c1f213ba91badd4f9e

Contents?: true

Size: 1.11 KB

Versions: 20

Compression:

Stored size: 1.11 KB

Contents

require 'action_view'

module CCS
  module 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
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
ccs-frontend_helpers-2.1.0 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb
ccs-frontend_helpers-2.0.0 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb
ccs-frontend_helpers-1.2.0 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb
ccs-frontend_helpers-1.1.2 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb
ccs-frontend_helpers-1.1.1 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb
ccs-frontend_helpers-1.1.0 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb
ccs-frontend_helpers-1.1.0.beta0 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb
ccs-frontend_helpers-1.0.0 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb
ccs-frontend_helpers-0.5.0.beta1 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb
ccs-frontend_helpers-0.5.0.beta0 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb
ccs-frontend_helpers-0.3.0 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb
ccs-frontend_helpers-0.2.0 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb
ccs-frontend_helpers-0.1.2 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb
ccs-frontend_helpers-0.1.1 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb
ccs-frontend_helpers-0.1.1.rc.1 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb
ccs-frontend_helpers-0.1.0.rc.7 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb
ccs-frontend_helpers-0.1.0.rc.6 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb
ccs-frontend_helpers-0.1.0.rc.5 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb
ccs-frontend_helpers-0.1.0.rc.4 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb
ccs-frontend_helpers-0.1.0.rc.3 lib/ccs/components/govuk/step_by_step_navigation/section/content/paragraph.rb