class Dedalus::PatternLibrary::ApplicationHeader

Attributes

subtitle[RW]
title[RW]

Public Class Methods

description() click to toggle source
# File lib/dedalus/pattern_library/organisms/app_header.rb, line 17
def self.description
  "An application header"
end
example_data() click to toggle source
# File lib/dedalus/pattern_library/organisms/app_header.rb, line 21
def self.example_data
  { title: "Fake app", description: "Hello world" }
end

Public Instance Methods

padding() click to toggle source
# File lib/dedalus/pattern_library/organisms/app_header.rb, line 13
def padding
  16
end
show() click to toggle source
# File lib/dedalus/pattern_library/organisms/app_header.rb, line 6
def show
  [
    heading,
    subheading
  ]
end

Private Instance Methods

heading() click to toggle source
# File lib/dedalus/pattern_library/organisms/app_header.rb, line 26
def heading
  @heading ||= Elements::Heading.new(text: title)
end
subheading() click to toggle source
# File lib/dedalus/pattern_library/organisms/app_header.rb, line 30
def subheading
  @subheading ||= Elements::Heading.new(text: subtitle, scale: 0.75)
end