error_boundary.pyi 3.8 KB

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