from typing import Optional from rio import Component, Rectangle, Text class MainViewContentBox(Component): content: Optional[Component] = None def build(self) -> Component: if self.content is None: content = Text("Vielleich sollte hier etwas sein...\n\n\n... Wenn ja, habe ich es nicht gefunden. :(") else: content = self.content return Rectangle( content=content, fill=self.session.theme.primary_color, margin_left=1, margin_right=1, margin_top=1, margin_bottom=1, shadow_radius=0.5, shadow_color=self.session.theme.hud_color, shadow_offset_y=0, corner_radius=0.2 )