Rename as "sticky" because "watermark" has a negative connotation

This commit is contained in:
Masen Furer 2025-01-23 16:53:42 -08:00
parent 8d58234db7
commit 87c1df35cf
No known key found for this signature in database
GPG Key ID: B0008AD22B3B3A95
2 changed files with 36 additions and 36 deletions

View File

@ -1,4 +1,4 @@
"""Components for displaying the Reflex watermark.""" """Components for displaying the Reflex sticky logo."""
from reflex.components.component import ComponentNamespace from reflex.components.component import ComponentNamespace
from reflex.components.core.colors import color from reflex.components.core.colors import color
@ -9,7 +9,7 @@ from reflex.components.radix.themes.typography.text import Text
from reflex.style import Style from reflex.style import Style
class WatermarkLogo(Svg): class StickyLogo(Svg):
"""A simple Reflex logo SVG with only the letter R.""" """A simple Reflex logo SVG with only the letter R."""
@classmethod @classmethod
@ -42,15 +42,15 @@ class WatermarkLogo(Svg):
) )
class WatermarkLabel(Text): class StickyLabel(Text):
"""A label that displays the Reflex watermark.""" """A label that displays the Reflex sticky."""
@classmethod @classmethod
def create(cls): def create(cls):
"""Create the watermark label. """Create the sticky label.
Returns: Returns:
The watermark label. The sticky label.
""" """
return super().create("Built with Reflex!") return super().create("Built with Reflex!")
@ -72,19 +72,19 @@ class WatermarkLabel(Text):
) )
class WatermarkBadge(Box): class StickyBadge(Box):
"""A badge that displays the Reflex watermark.""" """A badge that displays the Reflex sticky."""
@classmethod @classmethod
def create(cls): def create(cls):
"""Create the watermark badge. """Create the sticky badge.
Returns: Returns:
The watermark badge. The sticky badge.
""" """
return super().create( return super().create(
WatermarkLogo.create(), StickyLogo.create(),
WatermarkLabel.create(), StickyLabel.create(),
width="auto", width="auto",
padding="0.375rem", padding="0.375rem",
align="center", align="center",
@ -120,12 +120,12 @@ class WatermarkBadge(Box):
) )
class WatermarkNamespace(ComponentNamespace): class StickyNamespace(ComponentNamespace):
"""Watermark components namespace.""" """Sticky components namespace."""
__call__ = staticmethod(WatermarkBadge.create) __call__ = staticmethod(StickyBadge.create)
label = staticmethod(WatermarkLabel.create) label = staticmethod(StickyLabel.create)
logo = staticmethod(WatermarkLogo.create) logo = staticmethod(StickyLogo.create)
watermark = WatermarkNamespace() sticky = StickyNamespace()

View File

@ -1,4 +1,4 @@
"""Stub file for reflex/components/core/watermark.py""" """Stub file for reflex/components/core/sticky.py"""
# ------------------- DO NOT EDIT ---------------------- # ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`! # This file was generated by `reflex/utils/pyi_generator.py`!
@ -14,7 +14,7 @@ from reflex.event import BASE_STATE, EventType
from reflex.style import Style from reflex.style import Style
from reflex.vars.base import Var from reflex.vars.base import Var
class WatermarkLogo(Svg): class StickyLogo(Svg):
@overload @overload
@classmethod @classmethod
def create( # type: ignore def create( # type: ignore
@ -69,7 +69,7 @@ class WatermarkLogo(Svg):
on_scroll: Optional[EventType[[], BASE_STATE]] = None, on_scroll: Optional[EventType[[], BASE_STATE]] = None,
on_unmount: Optional[EventType[[], BASE_STATE]] = None, on_unmount: Optional[EventType[[], BASE_STATE]] = None,
**props, **props,
) -> "WatermarkLogo": ) -> "StickyLogo":
"""Create the simple Reflex logo SVG. """Create the simple Reflex logo SVG.
Returns: Returns:
@ -79,7 +79,7 @@ class WatermarkLogo(Svg):
def add_style(self): ... def add_style(self): ...
class WatermarkLabel(Text): class StickyLabel(Text):
@overload @overload
@classmethod @classmethod
def create( # type: ignore def create( # type: ignore
@ -291,17 +291,17 @@ class WatermarkLabel(Text):
on_scroll: Optional[EventType[[], BASE_STATE]] = None, on_scroll: Optional[EventType[[], BASE_STATE]] = None,
on_unmount: Optional[EventType[[], BASE_STATE]] = None, on_unmount: Optional[EventType[[], BASE_STATE]] = None,
**props, **props,
) -> "WatermarkLabel": ) -> "StickyLabel":
"""Create the watermark label. """Create the sticky label.
Returns: Returns:
The watermark label. The sticky label.
""" """
... ...
def add_style(self): ... def add_style(self): ...
class WatermarkBadge(Box): class StickyBadge(Box):
@overload @overload
@classmethod @classmethod
def create( # type: ignore def create( # type: ignore
@ -353,19 +353,19 @@ class WatermarkBadge(Box):
on_scroll: Optional[EventType[[], BASE_STATE]] = None, on_scroll: Optional[EventType[[], BASE_STATE]] = None,
on_unmount: Optional[EventType[[], BASE_STATE]] = None, on_unmount: Optional[EventType[[], BASE_STATE]] = None,
**props, **props,
) -> "WatermarkBadge": ) -> "StickyBadge":
"""Create the watermark badge. """Create the sticky badge.
Returns: Returns:
The watermark badge. The sticky badge.
""" """
... ...
def add_style(self): ... def add_style(self): ...
class WatermarkNamespace(ComponentNamespace): class StickyNamespace(ComponentNamespace):
label = staticmethod(WatermarkLabel.create) label = staticmethod(StickyLabel.create)
logo = staticmethod(WatermarkLogo.create) logo = staticmethod(StickyLogo.create)
@staticmethod @staticmethod
def __call__( def __call__(
@ -416,12 +416,12 @@ class WatermarkNamespace(ComponentNamespace):
on_scroll: Optional[EventType[[], BASE_STATE]] = None, on_scroll: Optional[EventType[[], BASE_STATE]] = None,
on_unmount: Optional[EventType[[], BASE_STATE]] = None, on_unmount: Optional[EventType[[], BASE_STATE]] = None,
**props, **props,
) -> "WatermarkBadge": ) -> "StickyBadge":
"""Create the watermark badge. """Create the sticky badge.
Returns: Returns:
The watermark badge. The sticky badge.
""" """
... ...
watermark = WatermarkNamespace() sticky = StickyNamespace()