Sticky tweaks: only show in prod mode
Only display the sticky badge in prod mode. Display the mini-badge for mobile and tablet; full badge only displayed at desktop width.
This commit is contained in:
parent
8b2c7291d3
commit
f1a555b851
@ -1040,7 +1040,7 @@ class App(MiddlewareMixin, LifespanMixin):
|
|||||||
self._validate_var_dependencies()
|
self._validate_var_dependencies()
|
||||||
self._setup_overlay_component()
|
self._setup_overlay_component()
|
||||||
self._setup_error_boundary()
|
self._setup_error_boundary()
|
||||||
if config.show_built_with_reflex:
|
if is_prod_mode() and config.show_built_with_reflex:
|
||||||
self._setup_sticky_badge()
|
self._setup_sticky_badge()
|
||||||
|
|
||||||
progress.advance(task)
|
progress.advance(task)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
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
|
||||||
from reflex.components.core.cond import color_mode_cond, cond
|
from reflex.components.core.cond import color_mode_cond, cond
|
||||||
from reflex.components.core.responsive import tablet_and_desktop
|
from reflex.components.core.responsive import desktop_only
|
||||||
from reflex.components.el.elements.inline import A
|
from reflex.components.el.elements.inline import A
|
||||||
from reflex.components.el.elements.media import Path, Rect, Svg
|
from reflex.components.el.elements.media import Path, Rect, Svg
|
||||||
from reflex.components.radix.themes.typography.text import Text
|
from reflex.components.radix.themes.typography.text import Text
|
||||||
@ -87,7 +87,7 @@ class StickyBadge(A):
|
|||||||
"""
|
"""
|
||||||
return super().create(
|
return super().create(
|
||||||
StickyLogo.create(),
|
StickyLogo.create(),
|
||||||
tablet_and_desktop(StickyLabel.create()),
|
desktop_only(StickyLabel.create()),
|
||||||
href="https://reflex.dev",
|
href="https://reflex.dev",
|
||||||
target="_blank",
|
target="_blank",
|
||||||
width="auto",
|
width="auto",
|
||||||
|
Loading…
Reference in New Issue
Block a user