highlight.py 357 B

123456789101112131415
  1. """A heading component."""
  2. from typing import List
  3. from pynecone.components.libs.chakra import ChakraComponent
  4. from pynecone.var import Var
  5. class Highlight(ChakraComponent):
  6. """Highlights a specific part of a string."""
  7. tag = "Highlight"
  8. # A query for the text to highlight. Can be a string or a list of strings.
  9. query: Var[List[str]]