Module: Protos::Typography

Defined in:
lib/protos/typography.rb,
lib/protos/typography/heading.rb,
lib/protos/typography/paragraph.rb,
lib/protos/typography/inline_link.rb

Defined Under Namespace

Classes: Heading, InlineLink, Paragraph

Instance Method Summary collapse

Instance Method Details

#h1Object



12
13
14
# File 'lib/protos/typography.rb', line 12

def h1(**, &)
  render Heading.new(level: 1, size: :xl, **, &)
end

#h2Object



16
17
18
# File 'lib/protos/typography.rb', line 16

def h2(**, &)
  render Heading.new(level: 2, size: :lg, **, &)
end

#h3Object



20
21
22
# File 'lib/protos/typography.rb', line 20

def h3(**, &)
  render Heading.new(level: 3, size: :md, **, &)
end

#h4Object



24
25
26
# File 'lib/protos/typography.rb', line 24

def h4(**, &)
  render Heading.new(level: 4, size: :sm, **, &)
end

#inline_aObject



32
33
34
# File 'lib/protos/typography.rb', line 32

def inline_a(**, &)
  render InlineLink.new(**, &)
end

#pObject



28
29
30
# File 'lib/protos/typography.rb', line 28

def p(**, &)
  render Paragraph.new(**, &)
end