dhxpyt.popup

1from .popup import Popup
2from .popup_config import PopupConfig
3
4__all__ = [
5    'Popup',
6    'PopupConfig'
7]
class PopupConfig:
 6class PopupConfig:
 7    """
 8    Configuration class for the Popup widget.
 9    """
10    def __init__(self,
11                 css: str = None):
12        """
13        Initializes the PopupConfig.
14
15        :param css: (Optional) Adds style classes for the component.
16        """
17        self.css = css
18
19    def to_dict(self) -> Dict[str, Any]:
20        """
21        Converts the PopupConfig into a dictionary format.
22        """
23        config_dict = {
24            'css': self.css
25        }
26        # Remove None values
27        return {k: v for k, v in config_dict.items() if v is not None}

Configuration class for the Popup widget.

PopupConfig(css: str = None)
10    def __init__(self,
11                 css: str = None):
12        """
13        Initializes the PopupConfig.
14
15        :param css: (Optional) Adds style classes for the component.
16        """
17        self.css = css

Initializes the PopupConfig.

Parameters
  • css: (Optional) Adds style classes for the component.
css
def to_dict(self) -> Dict[str, Any]:
19    def to_dict(self) -> Dict[str, Any]:
20        """
21        Converts the PopupConfig into a dictionary format.
22        """
23        config_dict = {
24            'css': self.css
25        }
26        # Remove None values
27        return {k: v for k, v in config_dict.items() if v is not None}

Converts the PopupConfig into a dictionary format.