Sha256: c5615af9d8210bb765d02433a50a39dbc621a88bf49300fa4f47db4057104ec4

Contents?: true

Size: 761 Bytes

Versions: 1

Compression:

Stored size: 761 Bytes

Contents

# frozen_string_literal: true

require_relative '../../components/govuk/button'

module CCS
  module FrontendHelpers::GovUKFrontend
    # = GOV.UK Button
    #
    # This helper is used for generating the button component from the
    # {https://design-system.service.gov.uk/components/button GDS - Components - Button}

    module Button
      # Generates the HTML for the GOV.UK button component
      #
      # @param (see CCS::Components::GovUK::Button#initialize)
      #
      # @option (see CCS::Components::GovUK::Button#initialize)
      #
      # @return (see CCS::Components::GovUK::Button#render)

      def govuk_button(text, **options)
        Components::GovUK::Button.new(context: self, text: text, **options).render
      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/frontend_helpers/govuk_frontend/button.rb