Module: Klods::Components::Table
- Included in:
- Builders
- Defined in:
- lib/klods/components/table.rb
Instance Method Summary collapse
- #table(a = nil, b = nil) ⇒ Object
- #table_wrap(a = nil, b = nil) ⇒ Object
- #tbody(a = nil, b = nil) ⇒ Object
- #td(a = nil, b = nil) ⇒ Object
- #th(a = nil, b = nil) ⇒ Object
- #thead(a = nil, b = nil) ⇒ Object
- #tr(a = nil, b = nil) ⇒ Object
Instance Method Details
#table(a = nil, b = nil) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/klods/components/table.rb', line 9 def table(a = nil, b = nil) props, children = Core.normalize_args(a, b) Core.build( tag: "table", base: "klods-table", modifiers: { striped: "klods-table--striped", dense: "klods-table--dense" }, props: props, children: children ) end |
#table_wrap(a = nil, b = nil) ⇒ Object
4 5 6 7 |
# File 'lib/klods/components/table.rb', line 4 def table_wrap(a = nil, b = nil) props, children = Core.normalize_args(a, b) Core.build(tag: "div", base: "klods-table-wrap", props: props, children: children) end |
#tbody(a = nil, b = nil) ⇒ Object
26 27 28 29 |
# File 'lib/klods/components/table.rb', line 26 def tbody(a = nil, b = nil) props, children = Core.normalize_args(a, b) Core.el("tbody", props, children) end |
#td(a = nil, b = nil) ⇒ Object
41 42 43 44 |
# File 'lib/klods/components/table.rb', line 41 def td(a = nil, b = nil) props, children = Core.normalize_args(a, b) Core.el("td", props, children) end |
#th(a = nil, b = nil) ⇒ Object
36 37 38 39 |
# File 'lib/klods/components/table.rb', line 36 def th(a = nil, b = nil) props, children = Core.normalize_args(a, b) Core.el("th", props, children) end |
#thead(a = nil, b = nil) ⇒ Object
21 22 23 24 |
# File 'lib/klods/components/table.rb', line 21 def thead(a = nil, b = nil) props, children = Core.normalize_args(a, b) Core.el("thead", props, children) end |
#tr(a = nil, b = nil) ⇒ Object
31 32 33 34 |
# File 'lib/klods/components/table.rb', line 31 def tr(a = nil, b = nil) props, children = Core.normalize_args(a, b) Core.el("tr", props, children) end |