Module: Klods::Components::Dl
- Included in:
- Builders
- Defined in:
- lib/klods/components/dl.rb
Instance Method Summary collapse
- #dd(a = nil, b = nil, &block) ⇒ Object
- #dl(a = nil, b = nil, &block) ⇒ Object
- #dt(a = nil, b = nil, &block) ⇒ Object
Instance Method Details
#dd(a = nil, b = nil, &block) ⇒ Object
20 21 22 23 24 |
# File 'lib/klods/components/dl.rb', line 20 def dd(a = nil, b = nil, &block) props, children = Core.normalize_args(a, b) children = klods_capture(&block) if block Core.build(tag: "dd", base: "klods-dd", props: props, children: children) end |
#dl(a = nil, b = nil, &block) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/klods/components/dl.rb', line 4 def dl(a = nil, b = nil, &block) props, children = Core.normalize_args(a, b) children = klods_capture(&block) if block Core.build( tag: "dl", base: "klods-dl", modifiers: {inline: "klods-dl--inline"}, props: props, children: children ) end |
#dt(a = nil, b = nil, &block) ⇒ Object
14 15 16 17 18 |
# File 'lib/klods/components/dl.rb', line 14 def dt(a = nil, b = nil, &block) props, children = Core.normalize_args(a, b) children = klods_capture(&block) if block Core.build(tag: "dt", base: "klods-dt", props: props, children: children) end |