class GovukPublishingComponents::AppHelpers::BrandHelper

Public Class Methods

new(brand) click to toggle source
# File lib/govuk_publishing_components/app_helpers/brand_helper.rb, line 4
def initialize(brand)
  @brand = brand if brand
end

Public Instance Methods

border_color_class() click to toggle source
# File lib/govuk_publishing_components/app_helpers/brand_helper.rb, line 16
def border_color_class
  "brand__border-color" if @brand
end
brand_class() click to toggle source

Apply government organisation branding to individual components, specifically link colour and border colour see github.com/alphagov/govuk_publishing_components/blob/master/docs/component_branding.md

# File lib/govuk_publishing_components/app_helpers/brand_helper.rb, line 12
def brand_class
  "brand--#{@brand}" if @brand
end
color_class() click to toggle source
# File lib/govuk_publishing_components/app_helpers/brand_helper.rb, line 20
def color_class
  "brand__color" if @brand
end