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