reflex/reflex/components/chakra/navigation/linkoverlay.py
2024-03-05 21:36:41 +01:00

24 lines
593 B
Python

"""Link overlay components."""
from typing import Optional
from reflex.components.chakra import ChakraComponent
from reflex.vars import Var
class LinkOverlay(ChakraComponent):
"""Wraps child component in a link."""
tag: str = "LinkOverlay"
# If true, the link will open in new tab
is_external: Optional[Var[bool]] = None
# Href of the link overlay.
href: Optional[Var[str]] = None
class LinkBox(ChakraComponent):
"""The LinkBox lifts any nested links to the top using z-index to ensure proper keyboard navigation between links."""
tag: str = "LinkBox"