link.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. """Display the title of the current page."""
  2. from typing import Optional
  3. from reflex.components.component import Component
  4. from reflex.vars import Var
  5. class RawLink(Component):
  6. """A component that displays the title of the current page."""
  7. tag = "link"
  8. # The href.
  9. href: Optional[Var[str]] = None
  10. # The type of link.
  11. rel: Optional[Var[str]] = None
  12. class ScriptTag(Component):
  13. """A script tag with the specified type and source."""
  14. tag = "script"
  15. # The type of script represented.
  16. type_: Optional[Var[str]] = None
  17. # The URI of an external script.
  18. source: Optional[Var[str]] = None
  19. # Metadata to verify the content of the script.
  20. integrity: Optional[Var[str]] = None
  21. # Whether to allow cross-origin requests.
  22. crossorigin: Optional[Var[str]] = None
  23. # Indicates which referrer to send when fetching the script.
  24. referrer_policy: Optional[Var[str]] = None
  25. # Whether to asynchronously load the script.
  26. is_async: Optional[Var[bool]] = None
  27. # Whether to defer loading the script.
  28. defer: Optional[Var[bool]] = None