nextlink.py 483 B

123456789101112131415161718
  1. """A link component."""
  2. from pynecone.components.component import Component
  3. from pynecone.var import Var
  4. class NextLink(Component):
  5. """Links are accessible elements used primarily for navigation. This component is styled to resemble a hyperlink and semantically renders an <a>."""
  6. library = "next/link"
  7. tag = "NextLink"
  8. # The page to link to.
  9. href: Var[str]
  10. # Whether to pass the href prop to the child.
  11. pass_href: Var[bool] = True # type: ignore