callout.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. """Interactive components provided by @radix-ui/themes."""
  2. from typing import Literal
  3. from reflex import el
  4. from reflex.vars import Var
  5. from ..base import (
  6. CommonMarginProps,
  7. LiteralAccentColor,
  8. LiteralRadius,
  9. LiteralVariant,
  10. RadixThemesComponent,
  11. )
  12. class CalloutRoot(el.Div, CommonMarginProps, RadixThemesComponent):
  13. """Trigger an action or event, such as submitting a form or displaying a dialog."""
  14. tag = "Callout.Root"
  15. # Change the default rendered element for the one passed as a child, merging their props and behavior.
  16. as_child: Var[bool]
  17. # Button size "1" - "4"
  18. size: Var[Literal["1", "2", "3"]]
  19. # Variant of button: "solid" | "soft" | "outline" | "ghost"
  20. variant: Var[LiteralVariant]
  21. # Override theme color for button
  22. color: Var[LiteralAccentColor]
  23. # Whether to render the button with higher contrast color against background
  24. high_contrast: Var[bool]
  25. # Override theme radius for button: "none" | "small" | "medium" | "large" | "full"
  26. radius: Var[LiteralRadius]
  27. class CalloutIcon(el.Div, CommonMarginProps, RadixThemesComponent):
  28. """Trigger an action or event, such as submitting a form or displaying a dialog."""
  29. tag = "Callout.Icon"
  30. class CalloutText(el.P, CommonMarginProps, RadixThemesComponent):
  31. """Trigger an action or event, such as submitting a form or displaying a dialog."""
  32. tag = "Callout.Text"