error_boundary.pyi 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. """Stub file for reflex/components/base/error_boundary.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Callable, Dict, List, Optional, Union, overload
  6. from reflex.components.component import Component
  7. from reflex.event import EventHandler, EventSpec
  8. from reflex.style import Style
  9. from reflex.utils.imports import ImportVar
  10. from reflex.vars import BaseVar, Var
  11. class ErrorBoundary(Component):
  12. def add_imports(self) -> dict[str, list[ImportVar]]: ...
  13. def add_hooks(self) -> List[str | Var]: ...
  14. def add_custom_code(self) -> List[str]: ...
  15. @overload
  16. @classmethod
  17. def create( # type: ignore
  18. cls,
  19. *children,
  20. Fallback_component: Optional[Union[Var[Component], Component]] = None,
  21. style: Optional[Style] = None,
  22. key: Optional[Any] = None,
  23. id: Optional[Any] = None,
  24. class_name: Optional[Any] = None,
  25. autofocus: Optional[bool] = None,
  26. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  27. on_blur: Optional[
  28. Union[EventHandler, EventSpec, list, Callable, BaseVar]
  29. ] = None,
  30. on_click: Optional[
  31. Union[EventHandler, EventSpec, list, Callable, BaseVar]
  32. ] = None,
  33. on_context_menu: Optional[
  34. Union[EventHandler, EventSpec, list, Callable, BaseVar]
  35. ] = None,
  36. on_double_click: Optional[
  37. Union[EventHandler, EventSpec, list, Callable, BaseVar]
  38. ] = None,
  39. on_error: Optional[
  40. Union[EventHandler, EventSpec, list, Callable, BaseVar]
  41. ] = None,
  42. on_focus: Optional[
  43. Union[EventHandler, EventSpec, list, Callable, BaseVar]
  44. ] = None,
  45. on_mount: Optional[
  46. Union[EventHandler, EventSpec, list, Callable, BaseVar]
  47. ] = None,
  48. on_mouse_down: Optional[
  49. Union[EventHandler, EventSpec, list, Callable, BaseVar]
  50. ] = None,
  51. on_mouse_enter: Optional[
  52. Union[EventHandler, EventSpec, list, Callable, BaseVar]
  53. ] = None,
  54. on_mouse_leave: Optional[
  55. Union[EventHandler, EventSpec, list, Callable, BaseVar]
  56. ] = None,
  57. on_mouse_move: Optional[
  58. Union[EventHandler, EventSpec, list, Callable, BaseVar]
  59. ] = None,
  60. on_mouse_out: Optional[
  61. Union[EventHandler, EventSpec, list, Callable, BaseVar]
  62. ] = None,
  63. on_mouse_over: Optional[
  64. Union[EventHandler, EventSpec, list, Callable, BaseVar]
  65. ] = None,
  66. on_mouse_up: Optional[
  67. Union[EventHandler, EventSpec, list, Callable, BaseVar]
  68. ] = None,
  69. on_scroll: Optional[
  70. Union[EventHandler, EventSpec, list, Callable, BaseVar]
  71. ] = None,
  72. on_unmount: Optional[
  73. Union[EventHandler, EventSpec, list, Callable, BaseVar]
  74. ] = None,
  75. **props,
  76. ) -> "ErrorBoundary":
  77. """Create the component.
  78. Args:
  79. *children: The children of the component.
  80. Fallback_component: Rendered instead of the children when an error is caught.
  81. style: The style of the component.
  82. key: A unique key for the component.
  83. id: The id for the component.
  84. class_name: The class name for the component.
  85. autofocus: Whether the component should take the focus once the page is loaded
  86. custom_attrs: custom attribute
  87. **props: The props of the component.
  88. Returns:
  89. The component.
  90. """
  91. ...
  92. error_boundary = ErrorBoundary.create