EasyPage.Components.Tabber.Body (easy_page v0.1.0)
A component which takes :tab slots. Renders whichever :tab slot is currently selected, based on title.
Titles must be unique.
Warning
Most of Tabber's magic is in the backend, not the components. You are probably better off copying the source code so you can customize it for your app.
def render(assigns) do
~H"""
<EasyPage.Components.Tabber.Body.body tabber={@tabber}>
<:tab title="Tab A">
<TabA.render whatever_assigns={1234} />
</:tab>
<:tab title="Tab B">
<TabB.render other_assigns={1234} />
</:tab>
<:tab title="Tab C">
<p>Meow</p>
</:tab>
</EasyPage.Components.Tabber.Body.body>
"""
end
Summary
Functions
Attributes
tabber
(:map
) (required)
Slots
tab
- The body of a tab. Accepts attributes:title
(:string
) (required)