fixed errors
This commit is contained in:
parent
ccc40e0c8d
commit
0a78c8ab83
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user