BB.LiveView.Components (bb_liveview v0.2.3)
View SourceShared UI components for the BB Dashboard.
Provides reusable function components for building the dashboard interface.
Summary
Functions
Renders a status badge.
Renders a button.
Renders an empty state message.
Renders an error message.
Renders a loading spinner.
Renders a widget card with header and body.
Functions
Renders a status badge.
Examples
<.badge variant="success">Armed</.badge>
<.badge variant="danger">Error</.badge>Attributes
variant(:string) - Defaults to"muted". Must be one of"success","warning","danger", or"muted".
Slots
inner_block(required)
Renders a button.
Examples
<.button>Click me</.button>
<.button variant="primary" disabled={true}>Submit</.button>Attributes
type(:string) - Defaults to"button".variant(:string) - Defaults to"outline". Must be one of"primary","danger", or"outline".disabled(:boolean) - Defaults tofalse.class(:string) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block(required)
Renders an empty state message.
Examples
<.empty_state message="No events yet" />Attributes
message(:string) (required)icon(:string) - Defaults tonil.
Renders an error message.
Examples
<.error_message message="Failed to load robot data" />Attributes
message(:string) (required)
Renders a loading spinner.
Renders a widget card with header and body.
Examples
<.widget title="Safety">
<p>Widget content here</p>
</.widget>
<.widget title="Joints" loading={true}>
<p>Loading...</p>
</.widget>Attributes
title(:string) (required)loading(:boolean) - Defaults tofalse.class(:string) - Defaults tonil.
Slots
inner_block(required)actions