icon.py 260 B

12345678910
  1. import justpy as jp
  2. from .element import Element
  3. class Icon(Element):
  4. def __init__(self, name: str, size: str = '20px', color: str = 'dark'):
  5. view = jp.QIcon(name=name, classes=f'q-pt-xs text-{color}', size=size)
  6. super().__init__(view)