reflex/reflex/components/next/link.py
Khaleel Al-Adhami 085b761f6b
replace old var system with immutable one (#3916)
* delete most references to varr

* [REF-3562][REF-3563] Replace chakra usage (#3872)

* only one mention of var

* delete vars.py why not

* remove reflex.vars

* rename immutable var to var

* rename ivars to vars

* add vars back smh

* ruff

* no more create_safe

* reorder deprecated

* remove raises

* remove all Var.create

* move to new api

* fix unit tests

* fix pyi hopefully

* sort literals

* fix event handler issues

* update poetry

* fix silly issues i'm very silly

* add var_operation_return

* rename immutable to not immutable

* add str type

* it's ruff out there

---------

Co-authored-by: Elijah Ahianyo <elijahahianyo@gmail.com>
2024-09-13 16:01:52 -07:00

21 lines
508 B
Python

"""A link component."""
from reflex.components.component import Component
from reflex.vars.base import Var
class NextLink(Component):
"""Links are accessible elements used primarily for navigation. This component is styled to resemble a hyperlink and semantically renders an <a>."""
library = "next/link"
tag = "NextLink"
is_default = True
# The page to link to.
href: Var[str]
# Whether to pass the href prop to the child.
pass_href: Var[bool] = True # type: ignore