add missing default values to icon and link
This commit is contained in:
parent
7f8a457d74
commit
5c584da4ef
@ -1,5 +1,7 @@
|
|||||||
"""Lucide Icon component."""
|
"""Lucide Icon component."""
|
||||||
|
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.style import Style
|
from reflex.style import Style
|
||||||
from reflex.utils import format
|
from reflex.utils import format
|
||||||
@ -18,7 +20,7 @@ class Icon(LucideIconComponent):
|
|||||||
tag = "None"
|
tag = "None"
|
||||||
|
|
||||||
# The size of the icon in pixels.
|
# The size of the icon in pixels.
|
||||||
size: Var[int]
|
size: Optional[Var[int]] = None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(cls, *children, **props) -> Component:
|
def create(cls, *children, **props) -> Component:
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
"""A link component."""
|
"""A link component."""
|
||||||
|
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
from reflex.components.component import Component
|
from reflex.components.component import Component
|
||||||
from reflex.vars import Var
|
from reflex.vars import Var
|
||||||
|
|
||||||
@ -14,7 +16,7 @@ class NextLink(Component):
|
|||||||
is_default = True
|
is_default = True
|
||||||
|
|
||||||
# The page to link to.
|
# The page to link to.
|
||||||
href: Var[str]
|
href: Optional[Var[str]] = None
|
||||||
|
|
||||||
# Whether to pass the href prop to the child.
|
# Whether to pass the href prop to the child.
|
||||||
pass_href: Var[bool] = True # type: ignore
|
pass_href: Var[bool] = True # type: ignore
|
||||||
|
Loading…
Reference in New Issue
Block a user