From 5c584da4ef5d7395ba26f0a3ce77b05418c0f63b Mon Sep 17 00:00:00 2001 From: Benedikt Bartscher Date: Thu, 29 Feb 2024 01:42:13 +0100 Subject: [PATCH] add missing default values to icon and link --- reflex/components/lucide/icon.py | 4 +++- reflex/components/next/link.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/reflex/components/lucide/icon.py b/reflex/components/lucide/icon.py index 6be61a61a..b56f7f05f 100644 --- a/reflex/components/lucide/icon.py +++ b/reflex/components/lucide/icon.py @@ -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: diff --git a/reflex/components/next/link.py b/reflex/components/next/link.py index be32cd8e5..175208259 100644 --- a/reflex/components/next/link.py +++ b/reflex/components/next/link.py @@ -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