ovo.app.components.custom_elements¶
Module Contents¶
Functions¶
Heading with additional text in grey |
|
Tqdm-like wrapper that iterates over an iterable and shows a streamlit progress bar |
|
Create n columns, wrapping them every |
|
Highlight all occurrences of query in text with :primary-background[query] |
|
Simplified tabs that return the selected tab label, and persist the selected tab in the URL query params under the given key |
API¶
- ovo.app.components.custom_elements.heading_with_value(heading: str, secondary_text: str, level: int = 2, font_weight: int = 800)¶
Heading with additional text in grey
- ovo.app.components.custom_elements.subheading_with_value(heading: str, secondary_text: str, level: int = 3, font_weight: int = 600)¶
- ovo.app.components.custom_elements.iter_progress(iterable: Iterable, text=None, total=None, **kwargs)¶
Tqdm-like wrapper that iterates over an iterable and shows a streamlit progress bar
- ovo.app.components.custom_elements.get_approx_screen_width()¶
- ovo.app.components.custom_elements.approx_max_width(max_width, center=False)¶
- ovo.app.components.custom_elements.wrapped_columns(n: int, wrap=4, divider=False, **kwargs) list[streamlit.delta_generator.DeltaGenerator]¶
Create n columns, wrapping them every
wrapcolumns. Each row will always havewrapcolumns- Returns:
flat list of n columns
- ovo.app.components.custom_elements.confirm_download_button(data, **kwargs)¶
- ovo.app.components.custom_elements.highlight_query(text: str, query: str) str¶
Highlight all occurrences of query in text with :primary-background[query]
- ovo.app.components.custom_elements.refresh_button(key: str, text='Refresh')¶
- ovo.app.components.custom_elements.simple_tabs(names: list[str], key: str) str¶
Simplified tabs that return the selected tab label, and persist the selected tab in the URL query params under the given key
The tab container is actually unused in this case - we show the content below the tabs, since it seems to be smoother when switching tabs.
- Parameters:
names – list of tab names/labels
key – query param key to persist selected tab :return name of selected tab