list.py 768 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. """List components."""
  2. from pynecone.components.component import Component
  3. from pynecone.components.libs.chakra import ChakraComponent
  4. from pynecone.var import Var
  5. class List(ChakraComponent):
  6. """Display a list of items."""
  7. tag = "List"
  8. # The space between each list item
  9. spacing: Var[str]
  10. # Shorthand prop for listStylePosition
  11. style_position: Var[str]
  12. # Shorthand prop for listStyleType
  13. style_type: Var[str]
  14. class ListItem(ChakraComponent):
  15. """A single list item."""
  16. tag = "ListItem"
  17. class OrderedList(ChakraComponent):
  18. """An ordered list component with numbers."""
  19. tag = "OrderedList"
  20. class UnorderedList(ChakraComponent):
  21. """An unordered list component with bullets."""
  22. tag = "UnorderedList"