Sha256: c374331e16d669fbf6ca06315e571376cbeab5333568f6f18d4023fa9a6e1dd2
Contents?: true
Size: 872 Bytes
Versions: 101
Compression:
Stored size: 872 Bytes
Contents
module GovukPublishingComponents module Presenters class HeadingHelper attr_reader :heading_tag, :id, :classes def initialize(options) @heading_tag = "h2" @heading_tag = "h#{options[:heading_level]}" if [1, 2, 3, 4, 5, 6].include? options[:heading_level] @id = options[:id] @classes = "" @classes << " gem-c-heading--font-size-#{options[:font_size]}" if [24, 19].include? options[:font_size] @classes << " gem-c-heading--mobile-top-margin" if options[:mobile_top_margin] @classes << " gem-c-heading--padding" if options[:padding] @classes << " gem-c-heading--margin-bottom-#{options[:margin_bottom]}" if [2, 4].include? options[:margin_bottom] @classes << " gem-c-heading--border-top-#{options[:border_top]}" if [1, 2, 5].include? options[:border_top] end end end end
Version data entries
101 entries across 101 versions & 1 rubygems