iconbutton.pyi 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. """Stub file for reflex/components/forms/iconbutton.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `scripts/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Dict, Literal, Optional, Union, overload
  6. from reflex.vars import Var, BaseVar, ComputedVar
  7. from reflex.event import EventChain, EventHandler, EventSpec
  8. from reflex.style import Style
  9. from typing import Optional
  10. from reflex.components.component import Component
  11. from reflex.components.typography.text import Text
  12. from reflex.vars import Var
  13. class IconButton(Text):
  14. @overload
  15. @classmethod
  16. def create( # type: ignore
  17. cls,
  18. *children,
  19. type: Optional[Union[Var[str], str]] = None,
  20. aria_label: Optional[Union[Var[str], str]] = None,
  21. icon: Optional[Component] = None,
  22. is_active: Optional[Union[Var[bool], bool]] = None,
  23. is_disabled: Optional[Union[Var[bool], bool]] = None,
  24. is_loading: Optional[Union[Var[bool], bool]] = None,
  25. is_round: Optional[Union[Var[bool], bool]] = None,
  26. spinner: Optional[Union[Var[str], str]] = None,
  27. as_: Optional[Union[Var[str], str]] = None,
  28. no_of_lines: Optional[Union[Var[int], int]] = None,
  29. style: Optional[Style] = None,
  30. key: Optional[Any] = None,
  31. id: Optional[Any] = None,
  32. class_name: Optional[Any] = None,
  33. autofocus: Optional[bool] = None,
  34. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  35. on_blur: Optional[
  36. Union[EventHandler, EventSpec, list, function, BaseVar]
  37. ] = None,
  38. on_click: Optional[
  39. Union[EventHandler, EventSpec, list, function, BaseVar]
  40. ] = None,
  41. on_context_menu: Optional[
  42. Union[EventHandler, EventSpec, list, function, BaseVar]
  43. ] = None,
  44. on_double_click: Optional[
  45. Union[EventHandler, EventSpec, list, function, BaseVar]
  46. ] = None,
  47. on_focus: Optional[
  48. Union[EventHandler, EventSpec, list, function, BaseVar]
  49. ] = None,
  50. on_mount: Optional[
  51. Union[EventHandler, EventSpec, list, function, BaseVar]
  52. ] = None,
  53. on_mouse_down: Optional[
  54. Union[EventHandler, EventSpec, list, function, BaseVar]
  55. ] = None,
  56. on_mouse_enter: Optional[
  57. Union[EventHandler, EventSpec, list, function, BaseVar]
  58. ] = None,
  59. on_mouse_leave: Optional[
  60. Union[EventHandler, EventSpec, list, function, BaseVar]
  61. ] = None,
  62. on_mouse_move: Optional[
  63. Union[EventHandler, EventSpec, list, function, BaseVar]
  64. ] = None,
  65. on_mouse_out: Optional[
  66. Union[EventHandler, EventSpec, list, function, BaseVar]
  67. ] = None,
  68. on_mouse_over: Optional[
  69. Union[EventHandler, EventSpec, list, function, BaseVar]
  70. ] = None,
  71. on_mouse_up: Optional[
  72. Union[EventHandler, EventSpec, list, function, BaseVar]
  73. ] = None,
  74. on_scroll: Optional[
  75. Union[EventHandler, EventSpec, list, function, BaseVar]
  76. ] = None,
  77. on_unmount: Optional[
  78. Union[EventHandler, EventSpec, list, function, BaseVar]
  79. ] = None,
  80. **props
  81. ) -> "IconButton":
  82. """Create the component.
  83. Args:
  84. *children: The children of the component.
  85. type: The type of button.
  86. aria_label: A label that describes the button
  87. icon: The icon to be used in the button.
  88. is_active: If true, the button will be styled in its active state.
  89. is_disabled: If true, the button will be disabled.
  90. is_loading: If true, the button will show a spinner.
  91. is_round: If true, the button will be perfectly round. Else, it'll be slightly round
  92. spinner: Replace the spinner component when isLoading is set to true
  93. as_: Override the tag. The default tag is `<p>`.
  94. no_of_lines: Truncate text after a specific number of lines. It will render an ellipsis when the text exceeds the width of the viewport or max_width prop.
  95. style: The style of the component.
  96. key: A unique key for the component.
  97. id: The id for the component.
  98. class_name: The class name for the component.
  99. autofocus: Whether the component should take the focus once the page is loaded
  100. custom_attrs: custom attribute
  101. **props: The props of the component.
  102. Returns:
  103. The component.
  104. Raises:
  105. TypeError: If an invalid child is passed.
  106. """
  107. ...