add missing default values to icon and link

This commit is contained in:
Benedikt Bartscher 2024-02-29 01:42:13 +01:00
parent 7f8a457d74
commit 5c584da4ef
No known key found for this signature in database
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,7 @@
"""Lucide Icon component."""
from typing import Optional
from reflex.components.component import Component
from reflex.style import Style
from reflex.utils import format
@ -18,7 +20,7 @@ class Icon(LucideIconComponent):
tag = "None"
# The size of the icon in pixels.
size: Var[int]
size: Optional[Var[int]] = None
@classmethod
def create(cls, *children, **props) -> Component:

View File

@ -1,5 +1,7 @@
"""A link component."""
from typing import Optional
from reflex.components.component import Component
from reflex.vars import Var
@ -14,7 +16,7 @@ class NextLink(Component):
is_default = True
# The page to link to.
href: Var[str]
href: Optional[Var[str]] = None
# Whether to pass the href prop to the child.
pass_href: Var[bool] = True # type: ignore