Class: Protos::Table
- Inherits:
-
Component
show all
- Defined in:
- lib/protos/table.rb,
lib/protos/table/row.rb,
lib/protos/table/body.rb,
lib/protos/table/cell.rb,
lib/protos/table/head.rb,
lib/protos/table/footer.rb,
lib/protos/table/header.rb,
lib/protos/table/caption.rb
Defined Under Namespace
Classes: Body, Caption, Cell, Footer, Head, Header, Row
Constant Summary
collapse
- Sizes =
Types::Coercible::Symbol.enum(
:xs,
:sm,
:md,
:lg
)
- SIZES =
{
xs: "table-xs",
sm: "table-sm",
md: "table-md",
lg: "table-lg"
}.freeze
Instance Method Summary
collapse
Methods inherited from Component
#initialize
Instance Method Details
#body ⇒ Object
44
|
# File 'lib/protos/table.rb', line 44
def body(...) = render Body.new(...)
|
#caption ⇒ Object
46
|
# File 'lib/protos/table.rb', line 46
def caption(...) = render Caption.new(...)
|
#cell ⇒ Object
48
|
# File 'lib/protos/table.rb', line 48
def cell(...) = render Cell.new(...)
|
50
|
# File 'lib/protos/table.rb', line 50
def (...) = render .new(...)
|
#head ⇒ Object
52
|
# File 'lib/protos/table.rb', line 52
def head(...) = render Head.new(...)
|
54
|
# File 'lib/protos/table.rb', line 54
def (...) = render .new(...)
|
#row ⇒ Object
56
|
# File 'lib/protos/table.rb', line 56
def row(...) = render Row.new(...)
|
#view_template(&block) ⇒ Object
38
39
40
41
42
|
# File 'lib/protos/table.rb', line 38
def view_template(&block)
div(**attrs) do
table(class: css[:table], &block)
end
end
|