Convert pc.icon tag to title case (#553)

This commit is contained in:
Elyanah Aco 2023-02-17 09:49:03 +08:00 committed by GitHub
parent d72256d427
commit 12faa76279
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
"""An image component."""
from pynecone import utils
from pynecone.components.component import Component
@ -36,5 +37,5 @@ class Icon(ChakraIconComponent):
)
if "tag" not in props.keys():
raise AttributeError("Missing 'tag' keyword-argument for Icon")
props["tag"] = utils.to_title_case(props["tag"]) + "Icon"
return super().create(*children, **props)