fix: flatten React Router structure — no nested Routes, each page is a top-level route

This commit is contained in:
enzo
2026-07-22 19:21:29 +08:00
parent 07ff8c2a12
commit 1de5fcf698
3720 changed files with 1254827 additions and 49 deletions
@@ -0,0 +1,29 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Callable, Optional
from .element import Element
if TYPE_CHECKING:
from .styles.base import BaseStyle
class Button(Element):
def __init__(
self,
name: str,
label: str,
callback: Optional[Callable] = None,
style: Optional[BaseStyle] = None,
**metadata: Any,
):
self.name = name
self.label = label
self.callback = callback
super().__init__(style=style, metadata=metadata)
def activate(self) -> Any:
if self.callback:
return self.callback()
return True