- def _show_tooltip(self, id: str, title: str,
- clipboard_id: str=None) -> list:
- """Generate list of elements to display a text (e.g. a title) with a
- tooltip and optionaly with Copy&Paste icon and the clipboard
- functionality enabled.
-
- :param id: Tooltip ID.
- :param title: A text for which the tooltip will be displayed.
- :param clipboard_id: If defined, a Copy&Paste icon is displayed and the
- clipboard functionality is enabled.
- :type id: str
- :type title: str
- :type clipboard_id: str
- :returns: List of elements to display a text with a tooltip and
- optionaly with Copy&Paste icon.
- :rtype: list
- """
-
- return [
- dcc.Clipboard(target_id=clipboard_id, title="Copy URL") \
- if clipboard_id else str(),
- f"{title} ",
- dbc.Badge(
- id=id,
- children="?",
- pill=True,
- color="white",
- text_color="info",
- class_name="border ms-1",
- ),
- dbc.Tooltip(
- children=self._tooltips.get(id, str()),
- target=id,
- placement="auto"
- )
- ]
-