Harmonium v2.3.0
Harmonium.Table
View Source
Adds component to render pagination with correct harmonium classes.
Renders a table element (
).
Renders a table body element (
).
Constructs a table body class.
Constructs a callout class.
Renders a table data element (
).
Constructs a table data class.
Renders a table head element ().
Constructs a table head class.
Renders a table header element ( ).
Constructs a table header class.
Renders a table row element ( ).
Constructs a table row class.
Renders a table element ( ).
iex> safe_to_string(table(do: []))
~S(<table class="rev-Table"></table>)
Renders a table body element ( ).
iex> safe_to_string(table_body(do: []))
~S(<tbody class="rev-Table-body"></tbody>)
Constructs a table body class.
iex> table_body_class()
"rev-Table-body"
iex> table_body_class(stacked: true)
"rev-Table-body rev-Table-body--stacked"
Constructs a callout class.
iex> table_class()
"rev-Table"
iex> table_class(color: "blue")
"rev-Table rev-Table--colorblue"
iex> table_class(bold: true)
"rev-Table rev-Table--bold"
Renders a table data element ( ).
iex> safe_to_string(table_data)
~S(<td class="rev-Table-data"></td>)
iex> safe_to_string(table_data(attrs: [colspan: 2]))
~S(<td class="rev-Table-data" colspan="2"></td>)
iex> safe_to_string(table_data(do: []))
~S(<td class="rev-Table-data"></td>)
iex> safe_to_string(table_data(bold: true, attrs: [colspan: 2], do: []))
~S(<td class="rev-Table-data rev-Table-data--bold" colspan="2"></td>)
iex> safe_to_string(table_data(bold: true, italic: true, attrs: [colspan: 2], do: []))
~S(<td class="rev-Table-data rev-Table-data--bold rev-Table-data--italic" colspan="2"></td>)
Constructs a table data class.
iex> table_data_class()
"rev-Table-data"
iex> table_data_class(stacked: true)
"rev-Table-data rev-Table-data--stacked"
Renders a table head element ().
iex> safe_to_string(table_head(do: []))
~S(<thead class="rev-Table-head"></thead>)
Constructs a table head class.
iex> table_head_class()
"rev-Table-head"
iex> table_head_class(stacked: true)
"rev-Table-head rev-Table-head--stacked"
| | |