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