it's ruff out there
This commit is contained in:
parent
b24c4cdced
commit
6e79b5afe8
@ -2,21 +2,28 @@ from dataclasses import dataclass
|
|||||||
from typing import cast
|
from typing import cast
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
import reflex as rx
|
import reflex as rx
|
||||||
|
|
||||||
|
|
||||||
class SideBarState(rx.State):
|
class SideBarState(rx.State):
|
||||||
|
"""State for the side bar."""
|
||||||
|
|
||||||
current_page: rx.Field[str] = rx.field("/")
|
current_page: rx.Field[str] = rx.field("/")
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class SideBarPage:
|
class SideBarPage:
|
||||||
|
"""A page in the side bar."""
|
||||||
|
|
||||||
title: str
|
title: str
|
||||||
href: str
|
href: str
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class SideBarSection:
|
class SideBarSection:
|
||||||
|
"""A section in the side bar."""
|
||||||
|
|
||||||
name: str
|
name: str
|
||||||
icon: str
|
icon: str
|
||||||
pages: tuple[SideBarPage, ...]
|
pages: tuple[SideBarPage, ...]
|
||||||
@ -24,6 +31,8 @@ class SideBarSection:
|
|||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class Category:
|
class Category:
|
||||||
|
"""A category in the side bar."""
|
||||||
|
|
||||||
name: str
|
name: str
|
||||||
href: str
|
href: str
|
||||||
sections: tuple[SideBarSection, ...]
|
sections: tuple[SideBarSection, ...]
|
||||||
|
Loading…
Reference in New Issue
Block a user