code.py 1014 B

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