diff --git a/panel/chat/icon.py b/panel/chat/icon.py index bffe2db027..8bb34659cf 100644 --- a/panel/chat/icon.py +++ b/panel/chat/icon.py @@ -35,30 +35,18 @@ class ChatReactionIcons(CompositeWidget): >>> ChatReactionIcons(value=["like"], options={"like": "thumb-up", "dislike": "thumb-down"}) """ - active_icons = param.Dict( - default={}, - doc=""" - The mapping of reactions to their corresponding active icon names; - if not set, the active icon name will default to its "filled" version.""", - ) + active_icons = param.Dict(default={}, doc=""" + The mapping of reactions to their corresponding active icon names. + If not set, the active icon name will default to its "filled" version.""") + + css_classes = param.List(default=["reaction-icons"], doc="The CSS classes of the widget.") - options = param.Dict( - default={"favorite": "heart"}, - doc=""" + options = param.Dict(default={"favorite": "heart"}, doc=""" A key-value pair of reaction values and their corresponding tabler icon names - found on https://tabler-icons.io.""", - ) + found on https://tabler-icons.io.""") value = param.List(doc="The active reactions.") - css_classes = param.List(default=["reaction-icons"], doc="The CSS classes of the widget.") - - _rendered_icons = param.Dict( - default={}, - doc=""" - The rendered icons mapping reaction to icon.""", - ) - _stylesheets: ClassVar[List[str]] = [f"{CDN_DIST}css/chat_reaction_icons.css"] _composite_type = Column @@ -103,10 +91,11 @@ def _update_value(self, event): class ChatCopyIcon(ReactiveHTML): - value = param.String(default=None, doc="The text to copy to the clipboard.") fill = param.String(default="none", doc="The fill color of the icon.") + value = param.String(default=None, doc="The text to copy to the clipboard.") + _template = """
Design: + return design(theme=theme) + def _update_design(self, *_): from .theme import Design from .theme.native import Native if isinstance(self.design, Design): self._design = self.design - elif self.design: - self._design = self.design(theme=config.theme) else: - self._design = Native(theme=config.theme) + design = self.design or Native + self._design = self._instantiate_design(design, config.theme) def _update_loading(self, *_) -> None: if self.loading: