Module: Klods::Components::Prose

Included in:
Builders
Defined in:
lib/klods/components/prose.rb

Instance Method Summary collapse

Instance Method Details

#lead(a = nil, b = nil, &block) ⇒ Object



16
17
18
19
20
# File 'lib/klods/components/prose.rb', line 16

def lead(a = nil, b = nil, &block)
  props, children = Core.normalize_args(a, b)
  children = klods_capture(&block) if block
  Core.build(tag: "p", base: "klods-lead", props: props, children: children)
end

#muted(a = nil, b = nil, &block) ⇒ Object



10
11
12
13
14
# File 'lib/klods/components/prose.rb', line 10

def muted(a = nil, b = nil, &block)
  props, children = Core.normalize_args(a, b)
  children = klods_capture(&block) if block
  Core.build(tag: "span", base: "klods-muted", props: props, children: children)
end

#prose(a = nil, b = nil, &block) ⇒ Object



4
5
6
7
8
# File 'lib/klods/components/prose.rb', line 4

def prose(a = nil, b = nil, &block)
  props, children = Core.normalize_args(a, b)
  children = klods_capture(&block) if block
  Core.build(tag: "div", base: "klods-prose", props: props, children: children)
end

#text_center(a = nil, b = nil, &block) ⇒ Object



22
23
24
25
26
# File 'lib/klods/components/prose.rb', line 22

def text_center(a = nil, b = nil, &block)
  props, children = Core.normalize_args(a, b)
  children = klods_capture(&block) if block
  Core.build(tag: "div", base: "klods-text-center", props: props, children: children)
end