|
@@ -1,6 +1,7 @@
|
|
|
"""Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""
|
|
|
from typing import Any, Union
|
|
|
|
|
|
+from reflex import Component
|
|
|
from reflex.vars import Var as Var
|
|
|
|
|
|
from .base import BaseHTML
|
|
@@ -78,6 +79,16 @@ class Audio(BaseHTML):
|
|
|
class Img(BaseHTML):
|
|
|
"""Display the img element."""
|
|
|
|
|
|
+ @classmethod
|
|
|
+ def create(cls, *children, **props) -> Component:
|
|
|
+ if len(children) == 0:
|
|
|
+ comp = super().create(*children, **props)
|
|
|
+ print(props)
|
|
|
+ else:
|
|
|
+ return super().create(src=children[0], **props)
|
|
|
+
|
|
|
+ return comp
|
|
|
+
|
|
|
tag = "img"
|
|
|
|
|
|
# Image alignment with respect to its surrounding elements
|