ssb_sirius_dash.utils package¶
ssb_sirius_dash.utils.functions module¶
- format_timespan(start, end)¶
Formats the elapsed time between two time points into a human-readable string.
- Parameters:
start (int | float) – Start time in seconds, typically as a timestamp or relative value.
end (int | float) – End time in seconds, typically as a timestamp or relative value.
- Returns:
A formatted string representing the elapsed time between start and end. The format is “MM:SS.sss (sss ms)”, where: - MM is minutes, zero-padded to 2 digits. - SS.sss is seconds with 2 decimal places. - sss ms represents milliseconds.
- Return type:
str
- Raises:
ValueError – If start is greater than end.
- sidebar_button(icon, text, component_id, additional_styling=None)¶
Generate a sidebar button with an icon and label.
- Parameters:
icon (str) – The icon displayed at the top of the button.
text (str) – The label text displayed below the icon.
component_id (str) – The ID assigned to the button component.
additional_styling (dict, optional) – Additional styling applied to the button. Defaults to an empty dictionary.
- Returns:
A Div containing the styled button.
- Return type:
html.Div