__init__.py 545 B

1234567891011121314151617181920212223
  1. """Typography components."""
  2. from pynecone.components.component import Component
  3. from .heading import Heading
  4. from .markdown import Markdown
  5. from .text import Text
  6. def span(text: str, **kwargs) -> Component:
  7. """Create a span component.
  8. Args:
  9. text: The text to display.
  10. **kwargs: The keyword arguments to pass to the Text component.
  11. Returns:
  12. The span component.
  13. """
  14. return Text.create(text, as_="span", **kwargs)
  15. __all__ = [f for f in dir() if f[0].isupper() or f in ("span",)] # type: ignore