-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathusage.py
53 lines (49 loc) · 1.76 KB
/
usage.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from dash_resizable_panels import PanelGroup, Panel, PanelResizeHandle
from dash import Dash, html
app = Dash(__name__)
# Styles are defined in assets/style.css
app.layout = html.Div(
className="container",
children=[
PanelGroup(
id="panel-group",
children=[
Panel(
id="panel-1",
children=[html.Div("Panel 1")],
defaultSizePercentage=20,
minSizePercentage=15,
collapsible=True,
),
PanelResizeHandle(html.Div(className="resize-handle-horizontal")),
Panel(
id="panel-2",
children=[
PanelGroup(
id="panel-group-2",
children=[
Panel(id="panel-2-1", children=["Panel 2-1"]),
PanelResizeHandle(
html.Div(className="resize-handle-vertical")
),
Panel(id="panel-2-2", children=[html.Div("Panel 2-2")]),
],
direction="vertical",
)
],
minSizePercentage=50,
),
PanelResizeHandle(html.Div(className="resize-handle-horizontal")),
Panel(
id="panel-3",
children=[html.Div("Panel 3")],
defaultSizePercentage=20,
minSizePercentage=10,
),
],
direction="horizontal",
)
],
)
if __name__ == "__main__":
app.run_server(debug=True)