code.py 944 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. """Components for rendering heading.
  2. https://www.radix-ui.com/themes/docs/theme/typography
  3. """
  4. from __future__ import annotations
  5. from reflex import el
  6. from reflex.vars import Var
  7. from ..base import (
  8. CommonMarginProps,
  9. LiteralAccentColor,
  10. LiteralVariant,
  11. RadixThemesComponent,
  12. )
  13. from .base import (
  14. LiteralTextSize,
  15. LiteralTextWeight,
  16. )
  17. class Code(el.Code, CommonMarginProps, RadixThemesComponent):
  18. """A block level extended quotation."""
  19. tag = "Code"
  20. # The visual variant to apply: "solid" | "soft" | "outline" | "ghost"
  21. variant: Var[LiteralVariant]
  22. # Text size: "1" - "9"
  23. size: Var[LiteralTextSize]
  24. # Thickness of text: "light" | "regular" | "medium" | "bold"
  25. weight: Var[LiteralTextWeight]
  26. # Overrides the accent color inherited from the Theme.
  27. color: Var[LiteralAccentColor]
  28. # Whether to render the text with higher contrast color
  29. high_contrast: Var[bool]