1
0

error_boundary.pyi 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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, Optional, Tuple, Union, overload
  6. from reflex.components.component import Component
  7. from reflex.event import BASE_STATE, 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. @overload
  15. @classmethod
  16. def create( # type: ignore
  17. cls,
  18. *children,
  19. fallback_render: Optional[Union[Component, Var[Component]]] = None,
  20. style: Optional[Style] = None,
  21. key: Optional[Any] = None,
  22. id: Optional[Any] = None,
  23. class_name: Optional[Any] = None,
  24. autofocus: Optional[bool] = None,
  25. custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
  26. on_blur: Optional[EventType[[], BASE_STATE]] = None,
  27. on_click: Optional[EventType[[], BASE_STATE]] = None,
  28. on_context_menu: Optional[EventType[[], BASE_STATE]] = None,
  29. on_double_click: Optional[EventType[[], BASE_STATE]] = None,
  30. on_error: Optional[
  31. Union[
  32. EventType[[], BASE_STATE],
  33. EventType[[str], BASE_STATE],
  34. EventType[[str, str], BASE_STATE],
  35. ]
  36. ] = None,
  37. on_focus: Optional[EventType[[], BASE_STATE]] = None,
  38. on_mount: Optional[EventType[[], BASE_STATE]] = None,
  39. on_mouse_down: Optional[EventType[[], BASE_STATE]] = None,
  40. on_mouse_enter: Optional[EventType[[], BASE_STATE]] = None,
  41. on_mouse_leave: Optional[EventType[[], BASE_STATE]] = None,
  42. on_mouse_move: Optional[EventType[[], BASE_STATE]] = None,
  43. on_mouse_out: Optional[EventType[[], BASE_STATE]] = None,
  44. on_mouse_over: Optional[EventType[[], BASE_STATE]] = None,
  45. on_mouse_up: Optional[EventType[[], BASE_STATE]] = None,
  46. on_scroll: Optional[EventType[[], BASE_STATE]] = None,
  47. on_unmount: Optional[EventType[[], BASE_STATE]] = None,
  48. **props,
  49. ) -> "ErrorBoundary":
  50. """Create an ErrorBoundary component.
  51. Args:
  52. *children: The children of the component.
  53. on_error: Fired when the boundary catches an error.
  54. fallback_render: Rendered instead of the children when an error is caught.
  55. style: The style of the component.
  56. key: A unique key for the component.
  57. id: The id for the component.
  58. class_name: The class name for the component.
  59. autofocus: Whether the component should take the focus once the page is loaded
  60. custom_attrs: custom attribute
  61. **props: The props of the component.
  62. Returns:
  63. The ErrorBoundary component.
  64. """
  65. ...
  66. error_boundary = ErrorBoundary.create