Harmonium v2.3.0 Harmonium.Table View Source

Adds component to render pagination with correct harmonium classes.

Link to this section Summary

Functions

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 head class.

Renders a table header element (

).

Constructs a table row class.

Link to this section Functions

Renders a table element (

).

Constructs a table data class.

Renders a table head element (

).

Constructs a table header class.

Renders a table row 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>)
Link to this function

table_body_class(modifiers \\ []) View Source

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"
Link to this function

table_class(modifiers \\ []) View Source

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_head(do: []))
~S(<thead class="rev-Table-head"></thead>)
Link to this function

table_head_class(modifiers \\ []) View Source

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"
Link to this function

table_header(opts \\ []) View Source

Renders a table header element (

).

iex> safe_to_string(table_row(do: []))
~S(<tr class="rev-Table-row"></tr>)
Link to this function

table_row_class(modifiers \\ []) View Source

Constructs a table row class.

iex> table_row_class()
"rev-Table-row"

iex> table_row_class(stacked: true)
"rev-Table-row rev-Table-row--stacked"
).

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>)
Link to this function

table_data_class(modifiers \\ []) View Source

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_header(do: []))
~S(<th class="rev-Table-header"></th>)
Link to this function

table_header_class(modifiers \\ []) View Source

Constructs a table header class.

iex> table_header_class()
"rev-Table-header"

iex> table_header_class(stacked: true)
"rev-Table-header rev-Table-header--stacked"

Renders a table row element (