error_boundary.pyi 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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, Dict, List, Optional, Tuple, Union, overload
  6. from reflex.components.component import Component
  7. from reflex.event import EventType
  8. from reflex.style import Style
  9. from reflex.vars.base import Var
  10. def on_error_spec(
  11. error: Var[Dict[str, str]], info: Var[Dict[str, str]]
  12. ) -> Tuple[Var[str], Var[str]]: ...
  13. class ErrorBoundary(Component):
  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[Component, Var[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[EventType[[]]] = None,
  28. on_click: Optional[EventType[[]]] = None,
  29. on_context_menu: Optional[EventType[[]]] = None,
  30. on_double_click: Optional[EventType[[]]] = None,
  31. on_error: Optional[EventType[str, str]] = None,
  32. on_focus: Optional[EventType[[]]] = None,
  33. on_mount: Optional[EventType[[]]] = None,
  34. on_mouse_down: Optional[EventType[[]]] = None,
  35. on_mouse_enter: Optional[EventType[[]]] = None,
  36. on_mouse_leave: Optional[EventType[[]]] = None,
  37. on_mouse_move: Optional[EventType[[]]] = None,
  38. on_mouse_out: Optional[EventType[[]]] = None,
  39. on_mouse_over: Optional[EventType[[]]] = None,
  40. on_mouse_up: Optional[EventType[[]]] = None,
  41. on_scroll: Optional[EventType[[]]] = None,
  42. on_unmount: Optional[EventType[[]]] = None,
  43. **props,
  44. ) -> "ErrorBoundary":
  45. """Create an ErrorBoundary component.
  46. Args:
  47. *children: The children of the component.
  48. Fallback_component: Rendered instead of the children when an error is caught.
  49. style: The style of the component.
  50. key: A unique key for the component.
  51. id: The id for the component.
  52. class_name: The class name for the component.
  53. autofocus: Whether the component should take the focus once the page is loaded
  54. custom_attrs: custom attribute
  55. **props: The props of the component.
  56. Returns:
  57. The ErrorBoundary component.
  58. """
  59. ...
  60. error_boundary = ErrorBoundary.create