reflex/reflex/components/radix/themes/typography/heading.py
Thomas Brandého 0d39237b3c
upgrade to latest ruff (#3497)
* upgrade to latest ruff

* try to fix dep review

* try to fix dep review (2)

* upgrade black

* upgrade black (2)

* update allowed dependencies

* update allowed dependencies (2)

* update allowed dependencies (3)

* wait between interim and final in yield test

* remove previous commit, increase delay between yield

* forgot to save on the time.sleep(1) removal

* fix integration (maybe?)

* fix pyi?

* what even is going on

* what is realityi?

* test another fix for app harness

* try to wait even longer?

* force uvloop to be optional

* downpin fastapi < 0.111, remove changes to test
2024-06-19 12:32:13 +02:00

54 lines
1.3 KiB
Python

"""Components for rendering heading.
https://www.radix-ui.com/themes/docs/theme/typography
"""
from __future__ import annotations
from reflex.components.el import elements
from reflex.vars import Var
from ..base import (
LiteralAccentColor,
RadixThemesComponent,
)
from .base import (
LiteralTextAlign,
LiteralTextSize,
LiteralTextTrim,
LiteralTextWeight,
)
class Heading(elements.H1, RadixThemesComponent):
"""A foundational text primitive based on the <span> element."""
tag = "Heading"
# Change the default rendered element for the one passed as a child, merging their props and behavior.
as_child: Var[bool]
# Change the default rendered element into a semantically appropriate alternative (cannot be used with asChild)
as_: Var[str]
# Text size: "1" - "9"
size: Var[LiteralTextSize]
# Thickness of text: "light" | "regular" | "medium" | "bold"
weight: Var[LiteralTextWeight]
# Alignment of text in element: "left" | "center" | "right"
align: Var[LiteralTextAlign]
# Removes the leading trim space: "normal" | "start" | "end" | "both"
trim: Var[LiteralTextTrim]
# Overrides the accent color inherited from the Theme.
color_scheme: Var[LiteralAccentColor]
# Whether to render the text with higher contrast color
high_contrast: Var[bool]
heading = Heading.create