Class: GovukPublishingComponents::AppHelpers::BrandHelper
- Inherits:
-
Object
- Object
- GovukPublishingComponents::AppHelpers::BrandHelper
- Defined in:
- lib/govuk_publishing_components/app_helpers/brand_helper.rb
Instance Method Summary collapse
- #border_color_class ⇒ Object
-
#brand_class ⇒ Object
Apply government organisation branding to individual components, specifically link colour and border colour see github.com/alphagov/govuk_publishing_components/blob/main/docs/component_branding.md.
- #color_class ⇒ Object
-
#initialize(brand) ⇒ BrandHelper
constructor
A new instance of BrandHelper.
Constructor Details
#initialize(brand) ⇒ BrandHelper
Returns a new instance of BrandHelper.
4 5 6 |
# File 'lib/govuk_publishing_components/app_helpers/brand_helper.rb', line 4 def initialize(brand) @brand = brand if brand end |
Instance Method Details
#border_color_class ⇒ Object
16 17 18 |
# File 'lib/govuk_publishing_components/app_helpers/brand_helper.rb', line 16 def border_color_class "brand__border-color" if @brand end |
#brand_class ⇒ Object
Apply government organisation branding to individual components, specifically link colour and border colour see github.com/alphagov/govuk_publishing_components/blob/main/docs/component_branding.md
12 13 14 |
# File 'lib/govuk_publishing_components/app_helpers/brand_helper.rb', line 12 def brand_class "brand--#{@brand}" if @brand end |
#color_class ⇒ Object
20 21 22 |
# File 'lib/govuk_publishing_components/app_helpers/brand_helper.rb', line 20 def color_class "brand__color" if @brand end |