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.core.colors import color
@ -9,7 +9,7 @@ from reflex.components.radix.themes.typography.text import Text
from reflex.style import Style
class WatermarkLogo(Svg):
class StickyLogo(Svg):
"""A simple Reflex logo SVG with only the letter R."""
@classmethod
@ -42,15 +42,15 @@ class WatermarkLogo(Svg):
)
class WatermarkLabel(Text):
"""A label that displays the Reflex watermark."""
class StickyLabel(Text):
"""A label that displays the Reflex sticky."""
@classmethod
def create(cls):
"""Create the watermark label.
"""Create the sticky label.
Returns:
The watermark label.
The sticky label.
"""
return super().create("Built with Reflex!")
@ -72,19 +72,19 @@ class WatermarkLabel(Text):
)
class WatermarkBadge(Box):
"""A badge that displays the Reflex watermark."""
class StickyBadge(Box):
"""A badge that displays the Reflex sticky."""
@classmethod
def create(cls):
"""Create the watermark badge.
"""Create the sticky badge.
Returns:
The watermark badge.
The sticky badge.
"""
return super().create(
WatermarkLogo.create(),
WatermarkLabel.create(),
StickyLogo.create(),
StickyLabel.create(),
width="auto",
padding="0.375rem",
align="center",
@ -120,12 +120,12 @@ class WatermarkBadge(Box):
)
class WatermarkNamespace(ComponentNamespace):
"""Watermark components namespace."""
class StickyNamespace(ComponentNamespace):
"""Sticky components namespace."""
__call__ = staticmethod(WatermarkBadge.create)
label = staticmethod(WatermarkLabel.create)
logo = staticmethod(WatermarkLogo.create)
__call__ = staticmethod(StickyBadge.create)
label = staticmethod(StickyLabel.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 ----------------------
# 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.vars.base import Var
class WatermarkLogo(Svg):
class StickyLogo(Svg):
@overload
@classmethod
def create( # type: ignore
@ -69,7 +69,7 @@ class WatermarkLogo(Svg):
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
**props,
) -> "WatermarkLogo":
) -> "StickyLogo":
"""Create the simple Reflex logo SVG.
Returns:
@ -79,7 +79,7 @@ class WatermarkLogo(Svg):
def add_style(self): ...
class WatermarkLabel(Text):
class StickyLabel(Text):
@overload
@classmethod
def create( # type: ignore
@ -291,17 +291,17 @@ class WatermarkLabel(Text):
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
**props,
) -> "WatermarkLabel":
"""Create the watermark label.
) -> "StickyLabel":
"""Create the sticky label.
Returns:
The watermark label.
The sticky label.
"""
...
def add_style(self): ...
class WatermarkBadge(Box):
class StickyBadge(Box):
@overload
@classmethod
def create( # type: ignore
@ -353,19 +353,19 @@ class WatermarkBadge(Box):
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
**props,
) -> "WatermarkBadge":
"""Create the watermark badge.
) -> "StickyBadge":
"""Create the sticky badge.
Returns:
The watermark badge.
The sticky badge.
"""
...
def add_style(self): ...
class WatermarkNamespace(ComponentNamespace):
label = staticmethod(WatermarkLabel.create)
logo = staticmethod(WatermarkLogo.create)
class StickyNamespace(ComponentNamespace):
label = staticmethod(StickyLabel.create)
logo = staticmethod(StickyLogo.create)
@staticmethod
def __call__(
@ -416,12 +416,12 @@ class WatermarkNamespace(ComponentNamespace):
on_scroll: Optional[EventType[[], BASE_STATE]] = None,
on_unmount: Optional[EventType[[], BASE_STATE]] = None,
**props,
) -> "WatermarkBadge":
"""Create the watermark badge.
) -> "StickyBadge":
"""Create the sticky badge.
Returns:
The watermark badge.
The sticky badge.
"""
...
watermark = WatermarkNamespace()
sticky = StickyNamespace()