Sha256: a585ef73b9391439f3dde2ec6e965f842a99fa3c9b8267c0527351e761cf8bf4

Contents?: true

Size: 1.46 KB

Versions: 5

Compression:

Stored size: 1.46 KB

Contents

require_relative 'append'

module Voom
  module Presenters
    module DSL
      module Components
        module Mixins
          module Typography
            include Mixins::Append

            def display(*text, **attributes, &block)
              self << Components::Typography.new(parent: self, type: :display, text: text, context: context, **attributes, &block)
            end
            alias heading display

            def headline(*text, **attributes, &block)
              self << Components::Typography.new(parent: self, type: :headline, text: text, context: context, **attributes, &block)
            end

            def title(*text, **attributes, &block)
              self << Components::Typography.new(parent: self, type: :title, text: text, context: context, **attributes, &block)
            end

            def page_title(*text, **attributes, &block)
              self << Components::Typography.new(parent: self, type: :page_title, text: text, context: context, level: 1, **attributes, &block)
            end

            def subheading(*text, **attributes, &block)
              self << Components::Typography.new(parent: self, type: :subheading, text: text, context: context, **attributes, &block)
            end

            def body(*text, **attributes, &block)
              self << Components::Typography.new(parent: self, type: :body, text: text, context: context, **attributes, &block)
            end
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
voom-presenters-0.1.13 lib/voom/presenters/dsl/components/mixins/typography.rb
voom-presenters-0.1.12 lib/voom/presenters/dsl/components/mixins/typography.rb
voom-presenters-0.1.11 lib/voom/presenters/dsl/components/mixins/typography.rb
voom-presenters-0.1.10 lib/voom/presenters/dsl/components/mixins/typography.rb
voom-presenters-0.1.9 lib/voom/presenters/dsl/components/mixins/typography.rb