starting work on UI
This commit is contained in:
28
src/ui/widgets/sidebar.py
Normal file
28
src/ui/widgets/sidebar.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from textual.containers import Vertical, VerticalScroll, Horizontal
|
||||
from textual.widgets import Button, ListView
|
||||
from textual.app import ComposeResult
|
||||
|
||||
from ui.widgets.channel import Channel
|
||||
|
||||
|
||||
class Sidebar(Vertical):
|
||||
DEFAULT_CSS = """
|
||||
Sidebar {
|
||||
dock: left;
|
||||
background: $surface;
|
||||
width: 40;
|
||||
border-right: tall $surface-lighten-1;
|
||||
padding: 1;
|
||||
|
||||
#add-channel {
|
||||
min-width: 100%;
|
||||
margin: 1
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
with VerticalScroll(id="channels"):
|
||||
yield Channel()
|
||||
yield Channel()
|
||||
yield Button("+ New Channel", variant="success", id="add-channel")
|
||||
Reference in New Issue
Block a user