add team navbar

This commit is contained in:
David Rodenkirchen
2024-11-27 17:16:24 +01:00
parent f691851c9e
commit 48ad800853
3 changed files with 61 additions and 21 deletions
@@ -1,19 +1,20 @@
from rio import Component, TextStyle, Color, Link, Button, Text
class DesktopNavigationButton(Component):
STYLE = TextStyle(fill=Color.from_hex("02dac5"), font_size=0.9)
TEAM_STYLE = TextStyle(fill=Color.from_hex("F0EADE"), font_size=0.9)
label: str
target_url: str
is_team_navigation: bool = False
open_new_tab: bool = False
def build(self) -> Component:
return Link(
content=Button(
content=Text(self.label, style=self.STYLE),
content=Text(self.label, style=self.TEAM_STYLE if self.is_team_navigation else self.STYLE),
shape="rectangle",
style="minor",
color="secondary",
color="danger" if self.is_team_navigation else "secondary",
grow_x=True,
margin_left=0.6,
margin_right=0.6,