fixed errors

This commit is contained in:
Yummy-Yums 2024-05-14 19:26:04 +00:00 committed by Elijah
parent ccc40e0c8d
commit 0a78c8ab83

View File

@ -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